From 2bb8782c8041ce306d11236d529a8b0b5b1aeb6f Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 18 Apr 2017 00:21:12 -0400 Subject: [PATCH 1/6] Set margin-bottom to 0 for captions in figures The issue here is that figures have a margin of 24px and `p` tags also have a margin of 24px so figure caption get huge 48px margins on the bottom. --- sass/_theme_rst.sass | 1 + 1 file changed, 1 insertion(+) diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index ef0ebda6..2a927ba4 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -26,6 +26,7 @@ margin-bottom: $base-line-height p.caption font-style: italic + margin-bottom: 0px div.figure.align-center text-align: center From 079faa00d3a64d74cd15d63c78e25623b2c3fddd Mon Sep 17 00:00:00 2001 From: Jesse Tan Date: Mon, 18 Dec 2017 16:06:21 +0100 Subject: [PATCH 2/6] Do not add border to active links with level >1 --- sass/_theme_layout.sass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sass/_theme_layout.sass b/sass/_theme_layout.sass index 626d1f45..10b44443 100644 --- a/sass/_theme_layout.sass +++ b/sass/_theme_layout.sass @@ -78,8 +78,6 @@ position: relative background: $menu-vertical-background-color border: none - border-bottom: solid 1px darken($menu-vertical-background-color, 20%) - border-top: solid 1px darken($menu-vertical-background-color, 20%) padding-left: $gutter -4px +font-smooth &:hover @@ -94,6 +92,10 @@ line-height: 1.6em color: darken($menu-link-medium, 30%) + li.toctree-l1.current > a + border-bottom: solid 1px darken($menu-vertical-background-color, 20%) + border-top: solid 1px darken($menu-vertical-background-color, 20%) + // This is the on state for pages beyond second level li.toctree-l1.current li.toctree-l2, li.toctree-l2.current li.toctree-l3 > ul @@ -123,8 +125,6 @@ display: block background: darken($menu-vertical-background-color, 25%) padding: $gutter / 4 $gutter * 3.5 - border-top: none - border-bottom: none a:hover span.toctree-expand color: $menu-link-medium span.toctree-expand From d3326461e55900a84eb465611e6fb76da914be3e Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sun, 14 Jan 2018 15:40:41 -0500 Subject: [PATCH 3/6] Remove wyrm_addons/pygments (#504) * Remove wyrm_addons/pygments/ * Use own sass for codeblocks * Fix styling of code blocks * Set line height for all * Revert back to normal line height * Group css rules to keep them in sync --- docs/conf.py | 2 +- sass/_theme_rst.sass | 38 +++++++++++++++++++++++++++++++++----- sass/theme.sass | 4 ---- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 713abcf1..fc97c3d7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -96,7 +96,7 @@ exclude_patterns = [] #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 a2035c51..924990b3 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -19,9 +19,6 @@ max-width: 100% height: auto - .highlight > pre, .linenodiv > pre - line-height: normal - div.figure margin-bottom: $base-line-height p.caption @@ -53,8 +50,39 @@ margin-left: $base-line-height line-height: $base-line-height margin-bottom: $base-line-height - .literal-block, pre.literal-block - @extend .codeblock + + 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 + // 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 + div[class^='highlight'] pre + white-space: pre + margin: 0 + padding: $base-line-height / 2 $base-line-height / 2 + font-family: $code-font-family + 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 + 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 diff --git a/sass/theme.sass b/sass/theme.sass index c7322b74..5ae5a075 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 636f37ae6794281a2d99efbed0ec68d6b4a1ed93 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 15 Jan 2018 16:01:02 -0500 Subject: [PATCH 4/6] Remove base64 background image (#537) * Remove base64 background image * Address review comments --- sass/_theme_layout.sass | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sass/_theme_layout.sass b/sass/_theme_layout.sass index 626d1f45..499dd233 100644 --- a/sass/_theme_layout.sass +++ b/sass/_theme_layout.sass @@ -247,9 +247,7 @@ .wy-body-for-nav - background: left repeat-y $section-background-color - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxOERBMTRGRDBFMUUxMUUzODUwMkJCOThDMEVFNURFMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxOERBMTRGRTBFMUUxMUUzODUwMkJCOThDMEVFNURFMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjE4REExNEZCMEUxRTExRTM4NTAyQkI5OEMwRUU1REUwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjE4REExNEZDMEUxRTExRTM4NTAyQkI5OEMwRUU1REUwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+EwrlwAAAAA5JREFUeNpiMDU0BAgwAAE2AJgB9BnaAAAAAElFTkSuQmCC) - background-size: $nav-desktop-width 1px + background: $section-background-color .wy-grid-for-nav position: absolute From 5062c200d6e956cb8a96ec2940177efab7d715db Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 15 Jan 2018 16:09:24 -0500 Subject: [PATCH 5/6] Do not set the default role for the body tag (#542) * Do not set the default role for the body tag See https://www.w3.org/TR/html5/sections.html#the-body-element And: https://github.com/sphinx-doc/sphinx/pull/3495 * Remove nav role from nav tag --- sphinx_rtd_theme/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index e647bddd..21ddbaf5 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -86,7 +86,7 @@ - + {% block extrabody %} {% endblock %}
@@ -152,7 +152,7 @@
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} -