From 96ae49bb4b59ee0736335b360c60cbdb94bd4c23 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Fri, 15 Dec 2017 23:27:24 -0500 Subject: [PATCH 1/6] Remove wyrm_addons/pygments/ --- sass/theme.sass | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sass/theme.sass b/sass/theme.sass index c7322b749..5ae5a075a 100644 --- a/sass/theme.sass +++ b/sass/theme.sass @@ -40,10 +40,6 @@ @import wyrm_core/table @import wyrm_core/type -// Pygments styling -@import wyrm_addons/pygments/pygments -@import wyrm_addons/pygments/pygments_light - // Theme specific styles. These are likely the files you want to edit. @import theme_breadcrumbs @import theme_layout From 86b3b880f2f66c036c5c0863b2bab8aeb30b5dc6 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 16 Dec 2017 15:33:45 -0500 Subject: [PATCH 2/6] Use own sass for codeblocks --- demo_docs/source/conf.py | 2 +- sass/_theme_rst.sass | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/demo_docs/source/conf.py b/demo_docs/source/conf.py index e748895a2..94e6fceb1 100644 --- a/demo_docs/source/conf.py +++ b/demo_docs/source/conf.py @@ -93,7 +93,7 @@ #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'default' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index f0c2a0b77..4e2e591c5 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -19,9 +19,6 @@ max-width: 100% height: auto !important - .highlight > pre, .linenodiv > pre - line-height: normal - div.figure margin-bottom: $base-line-height p.caption @@ -49,8 +46,17 @@ margin-left: $base-line-height line-height: $base-line-height margin-bottom: $base-line-height - .literal-block, pre.literal-block - @extend .codeblock + .highlight > pre, .linenodiv > pre + line-height: normal + .codeblock, .literal-block, pre.literal-block div[class^='highlight'] + border: 1px solid $table-border-color + padding: 0px + overflow-x: auto + // 1px hack otherwise border won't show. lame + margin: 1px 0 $base-line-height 0 + div[class^='highlight'] + border: none + margin: 0 // These are the various note pullouts that sphinx applies .note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo, .admonition @extend .wy-alert From 51eecb0320dd481a02692348180200a095ceb117 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 16 Dec 2017 16:26:41 -0500 Subject: [PATCH 3/6] Fix styling of code blocks --- sass/_theme_rst.sass | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index 4e2e591c5..b5f442d94 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -46,9 +46,8 @@ margin-left: $base-line-height line-height: $base-line-height margin-bottom: $base-line-height - .highlight > pre, .linenodiv > pre - line-height: normal - .codeblock, .literal-block, pre.literal-block div[class^='highlight'] + + pre.literal-block, div[class^='highlight'] border: 1px solid $table-border-color padding: 0px overflow-x: auto @@ -57,6 +56,30 @@ div[class^='highlight'] border: none margin: 0 + // Needs 100% width for line highlighting to work properly + div[class^='highlight'] td.code + width: 100% + .linenodiv pre + border-right: solid 1px lighten($table-border-color, 2%) + margin: 0 + padding: $base-line-height / 2 $base-line-height / 2 + font-family: $code-font-family + font-size: 12px + line-height: 1.5 + div[class^='highlight'] pre + white-space: pre + margin: 0 + padding: $base-line-height / 2 $base-line-height / 2 + font-family: $code-font-family + font-size: 12px + line-height: 1.5 + display: block + overflow: auto + + @media print + .codeblock, div[class^='highlight'], div[class^='highlight'] pre + white-space: pre-wrap + // These are the various note pullouts that sphinx applies .note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo, .admonition @extend .wy-alert From 526b710a614c5ef5aff80a8be21f9e152051520e Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 16 Dec 2017 17:35:42 -0500 Subject: [PATCH 4/6] Set line height for all --- sass/_theme_rst.sass | 1 + 1 file changed, 1 insertion(+) diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index b5f442d94..516ef7eb8 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -51,6 +51,7 @@ border: 1px solid $table-border-color padding: 0px overflow-x: auto + line-height: 1.5 // 1px hack otherwise border won't show. lame margin: 1px 0 $base-line-height 0 div[class^='highlight'] From 22ef64ff45a0c320e3aec2c93da3301f59dcf457 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 19 Dec 2017 11:14:14 -0500 Subject: [PATCH 5/6] Revert back to normal line height --- sass/_theme_rst.sass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index 6fe246da3..6c434aded 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -55,7 +55,7 @@ border: 1px solid $table-border-color padding: 0px overflow-x: auto - line-height: 1.5 + line-height: normal // 1px hack otherwise border won't show. lame margin: 1px 0 $base-line-height 0 div[class^='highlight'] @@ -70,14 +70,14 @@ padding: $base-line-height / 2 $base-line-height / 2 font-family: $code-font-family font-size: 12px - line-height: 1.5 + line-height: normal div[class^='highlight'] pre white-space: pre margin: 0 padding: $base-line-height / 2 $base-line-height / 2 font-family: $code-font-family font-size: 12px - line-height: 1.5 + line-height: normal display: block overflow: auto From 4b841af45dd45832e080059bdd07252fcf069b6a Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sun, 7 Jan 2018 15:42:34 -0500 Subject: [PATCH 6/6] Group css rules to keep them in sync --- sass/_theme_rst.sass | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index 6c434aded..26dc6971f 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -55,7 +55,6 @@ border: 1px solid $table-border-color padding: 0px overflow-x: auto - line-height: normal // 1px hack otherwise border won't show. lame margin: 1px 0 $base-line-height 0 div[class^='highlight'] @@ -69,17 +68,16 @@ margin: 0 padding: $base-line-height / 2 $base-line-height / 2 font-family: $code-font-family - font-size: 12px - line-height: normal div[class^='highlight'] pre white-space: pre margin: 0 padding: $base-line-height / 2 $base-line-height / 2 font-family: $code-font-family - font-size: 12px - line-height: normal display: block overflow: auto + pre.literal-block, div[class^='highlight'] pre, .linenodiv pre + font-size: 12px + line-height: normal @media print .codeblock, div[class^='highlight'], div[class^='highlight'] pre