mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Cleanup: Sass formatting (#1119)
* Cleanup: Sass formatting This patch addresses some sass formatting to make the code easier to read: - Use leading zeros on decimals less than 1 - Use parentheses around math for css propeties with multiply arguments - Spaces after commas in arguments In the future it would be nice to automatically format this with a tool like style lint. * Revert Extra Tabbing * Add back missing line * Add whitespace back * Fix whitespace 2
This commit is contained in:
parent
2f12da38c6
commit
3db4e2fbfe
@ -30,7 +30,7 @@ ul.fas
|
|||||||
text-indent: -0.8em
|
text-indent: -0.8em
|
||||||
li
|
li
|
||||||
.fa
|
.fa
|
||||||
width: .8em
|
width: 0.8em
|
||||||
.fa-large:before,
|
.fa-large:before,
|
||||||
.fa-large:before
|
.fa-large:before
|
||||||
/* 1.5 increased font size for fa-large * 1.25 width
|
/* 1.5 increased font size for fa-large * 1.25 width
|
||||||
|
@ -15,7 +15,7 @@ html
|
|||||||
ul, li
|
ul, li
|
||||||
display: inline-block
|
display: inline-block
|
||||||
li:hover
|
li:hover
|
||||||
background: rgba(255,255,255,.1)
|
background: rgba(255, 255, 255, 0.1)
|
||||||
li
|
li
|
||||||
&.divide-left
|
&.divide-left
|
||||||
border-left: solid 1px hsl(0, 0%, 25%)
|
border-left: solid 1px hsl(0, 0%, 25%)
|
||||||
@ -35,7 +35,7 @@ html
|
|||||||
height: $base-font-size * 2
|
height: $base-font-size * 2
|
||||||
line-height: $base-font-size * 2
|
line-height: $base-font-size * 2
|
||||||
padding: 0 $gutter
|
padding: 0 $gutter
|
||||||
margin: $base-line-height / 2 0 0 0
|
margin: ($base-line-height / 2) 0 0 0
|
||||||
display: block
|
display: block
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
@ -54,7 +54,7 @@ html
|
|||||||
a
|
a
|
||||||
color: $menu-link-medium
|
color: $menu-link-medium
|
||||||
border-right: solid 1px darken($menu-vertical-background-color, 20%)
|
border-right: solid 1px darken($menu-vertical-background-color, 20%)
|
||||||
padding: $gutter / 4 $gutter * 1.5
|
padding: ($gutter / 4) ($gutter * 1.5)
|
||||||
&:hover
|
&:hover
|
||||||
background: darken($menu-vertical-background-color, 15%)
|
background: darken($menu-vertical-background-color, 15%)
|
||||||
code
|
code
|
||||||
@ -76,7 +76,7 @@ html
|
|||||||
// On state for the first level
|
// On state for the first level
|
||||||
li.on a, li.current > a
|
li.on a, li.current > a
|
||||||
color: $menu-link-color
|
color: $menu-link-color
|
||||||
padding: $gutter / 4 $gutter
|
padding: ($gutter / 4) $gutter
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
position: relative
|
position: relative
|
||||||
background: $menu-vertical-background-color
|
background: $menu-vertical-background-color
|
||||||
@ -107,7 +107,7 @@ html
|
|||||||
display: block
|
display: block
|
||||||
|
|
||||||
%shrink_toctree_element
|
%shrink_toctree_element
|
||||||
font-size: .9em
|
font-size: 0.9em
|
||||||
|
|
||||||
%toctree_link_color
|
%toctree_link_color
|
||||||
color: $menu-link-color
|
color: $menu-link-color
|
||||||
@ -128,11 +128,11 @@ html
|
|||||||
@extend %toctree_link_color
|
@extend %toctree_link_color
|
||||||
&.current
|
&.current
|
||||||
> a
|
> a
|
||||||
padding: $gutter / 4 $gutter * ($toc_level - 1 + .5)
|
padding: ($gutter / 4) ($gutter * ($toc_level - 1 + 0.5))
|
||||||
|
|
||||||
li.toctree-l#{$toc_level + 1} > a
|
li.toctree-l#{$toc_level + 1} > a
|
||||||
@extend %display_current_toctree_element
|
@extend %display_current_toctree_element
|
||||||
padding: $gutter / 4 $gutter * ($toc_level + .5)
|
padding: ($gutter / 4) ($gutter * ($toc_level + 0.5))
|
||||||
padding-right: $gutter
|
padding-right: $gutter
|
||||||
a:hover span.toctree-expand
|
a:hover span.toctree-expand
|
||||||
@extend %toctree_hover_link_color
|
@extend %toctree_hover_link_color
|
||||||
@ -168,7 +168,7 @@ html
|
|||||||
font-weight: normal
|
font-weight: normal
|
||||||
a
|
a
|
||||||
line-height: 18px
|
line-height: 18px
|
||||||
padding: $gutter / 4 $gutter
|
padding: ($gutter / 4) $gutter
|
||||||
display: block
|
display: block
|
||||||
position: relative
|
position: relative
|
||||||
font-size: 90%
|
font-size: 90%
|
||||||
@ -201,7 +201,7 @@ html
|
|||||||
border-color: darken($link-color, 5%)
|
border-color: darken($link-color, 5%)
|
||||||
img
|
img
|
||||||
display: block
|
display: block
|
||||||
margin: auto auto $gutter / 2 auto
|
margin: auto auto ($gutter / 2) auto
|
||||||
height: 45px
|
height: 45px
|
||||||
width: 45px
|
width: 45px
|
||||||
background-color: $menu-logo-color
|
background-color: $menu-logo-color
|
||||||
@ -212,11 +212,11 @@ html
|
|||||||
font-size: 100%
|
font-size: 100%
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
display: inline-block
|
display: inline-block
|
||||||
padding: $base-line-height / 6 $base-line-height / 4
|
padding: ($base-line-height / 6) ($base-line-height / 4)
|
||||||
margin-bottom: $gutter / 2
|
margin-bottom: $gutter / 2
|
||||||
+font-smooth
|
+font-smooth
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba(255,255,255,.1)
|
background: rgba(255, 255, 255, 0.1)
|
||||||
img.logo
|
img.logo
|
||||||
display: block // display on its own line all the time
|
display: block // display on its own line all the time
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
@ -224,15 +224,15 @@ html
|
|||||||
width: auto
|
width: auto
|
||||||
border-radius: 0
|
border-radius: 0
|
||||||
max-width: 100% // shrink on mobile, if appropriate
|
max-width: 100% // shrink on mobile, if appropriate
|
||||||
background: rgba(0,0,0,0) // make hover background of parent show up properly
|
background: rgba(0, 0, 0, 0) // make hover background of parent show up properly
|
||||||
&.icon
|
&.icon
|
||||||
img.logo
|
img.logo
|
||||||
margin-top: 0.85em // space it away from the title text
|
margin-top: 0.85em // space it away from the title text
|
||||||
> div.version
|
> div.version
|
||||||
margin-top: -1 * ($gutter / 4)
|
margin-top: -1 * $gutter / 4
|
||||||
margin-bottom: $gutter / 2
|
margin-bottom: $gutter / 2
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
color: rgba(255,255,255,.3)
|
color: rgba(255, 255, 255, 0.3)
|
||||||
|
|
||||||
.wy-nav .wy-menu-vertical
|
.wy-nav .wy-menu-vertical
|
||||||
header
|
header
|
||||||
@ -244,7 +244,7 @@ html
|
|||||||
color: $white
|
color: $white
|
||||||
|
|
||||||
[data-menu-wrap]
|
[data-menu-wrap]
|
||||||
+transition(all .2s ease-in)
|
+transition(all 0.2s ease-in)
|
||||||
position: absolute
|
position: absolute
|
||||||
opacity: 1
|
opacity: 1
|
||||||
width: 100%
|
width: 100%
|
||||||
@ -295,7 +295,7 @@ html
|
|||||||
display: none
|
display: none
|
||||||
background: $link-color
|
background: $link-color
|
||||||
color: $white
|
color: $white
|
||||||
padding: $gutter / 4 $gutter / 2
|
padding: ($gutter / 4) ($gutter / 2)
|
||||||
position: relative
|
position: relative
|
||||||
line-height: 50px
|
line-height: 50px
|
||||||
text-align: center
|
text-align: center
|
||||||
@ -324,7 +324,7 @@ html
|
|||||||
min-height: 100%
|
min-height: 100%
|
||||||
|
|
||||||
.wy-nav-content
|
.wy-nav-content
|
||||||
padding: $gutter $gutter * 2
|
padding: $gutter ($gutter * 2)
|
||||||
height: 100%
|
height: 100%
|
||||||
max-width: $nav-content-width
|
max-width: $nav-content-width
|
||||||
margin: auto
|
margin: auto
|
||||||
@ -333,7 +333,7 @@ html
|
|||||||
position: fixed
|
position: fixed
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 100%
|
height: 100%
|
||||||
background: rgba(0,0,0,.2)
|
background: rgba(0, 0, 0, 0.2)
|
||||||
display: none
|
display: none
|
||||||
z-index: $z-index-modal - 1
|
z-index: $z-index-modal - 1
|
||||||
&.on
|
&.on
|
||||||
@ -411,7 +411,7 @@ footer
|
|||||||
|
|
||||||
@media screen and (min-width: $nav-media-query)
|
@media screen and (min-width: $nav-media-query)
|
||||||
.wy-nav-content-wrap
|
.wy-nav-content-wrap
|
||||||
background: rgba(0,0,0,.05)
|
background: rgba(0, 0, 0, 0.05)
|
||||||
.wy-nav-content
|
.wy-nav-content
|
||||||
margin: 0
|
margin: 0
|
||||||
background: $section-background-color
|
background: $section-background-color
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
pre.literal-block
|
pre.literal-block
|
||||||
white-space: pre
|
white-space: pre
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: $base-line-height / 2 $base-line-height / 2
|
padding: ($base-line-height / 2) ($base-line-height / 2)
|
||||||
font-family: $code-font-family
|
font-family: $code-font-family
|
||||||
display: block
|
display: block
|
||||||
overflow: auto
|
overflow: auto
|
||||||
@ -75,21 +75,21 @@
|
|||||||
.linenodiv pre
|
.linenodiv pre
|
||||||
border-right: solid 1px lighten($table-border-color, 2%)
|
border-right: solid 1px lighten($table-border-color, 2%)
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: $base-line-height / 2 $base-line-height / 2
|
padding: ($base-line-height / 2) ($base-line-height / 2)
|
||||||
font-family: $code-font-family
|
font-family: $code-font-family
|
||||||
user-select: none
|
user-select: none
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
div[class^='highlight'] pre
|
div[class^='highlight'] pre
|
||||||
white-space: pre
|
white-space: pre
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: $base-line-height / 2 $base-line-height / 2
|
padding: ($base-line-height / 2) ($base-line-height / 2)
|
||||||
display: block
|
display: block
|
||||||
overflow: auto
|
overflow: auto
|
||||||
& .hll
|
& .hll
|
||||||
// Line emphasis spans full width
|
// Line emphasis spans full width
|
||||||
display: block
|
display: block
|
||||||
margin: 0 -1 * $base-line-height / 2
|
margin: 0 (-1 * $base-line-height / 2)
|
||||||
padding: 0 $base-line-height / 2
|
padding: 0 ($base-line-height / 2)
|
||||||
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
|
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
|
||||||
font-family: $code-font-family
|
font-family: $code-font-family
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
@ -135,10 +135,10 @@
|
|||||||
@extend .wy-alert.wy-alert-warning
|
@extend .wy-alert.wy-alert-warning
|
||||||
// Some people put tables in notes. Let's give them very basic support.
|
// Some people put tables in notes. Let's give them very basic support.
|
||||||
.admonition table
|
.admonition table
|
||||||
border-color: rgba(0,0,0,.1)
|
border-color: rgba(0, 0, 0, 0.1)
|
||||||
td, th
|
td, th
|
||||||
background: transparent !important
|
background: transparent !important
|
||||||
border-color: rgba(0,0,0,.1) !important
|
border-color: rgba(0, 0, 0, 0.1) !important
|
||||||
.section ul, .toctree-wrapper ul
|
.section ul, .toctree-wrapper ul
|
||||||
@extend .wy-plain-list-disc
|
@extend .wy-plain-list-disc
|
||||||
.section ol.loweralpha, .section ol.loweralpha > li
|
.section ol.loweralpha, .section ol.loweralpha > li
|
||||||
@ -234,14 +234,14 @@
|
|||||||
font-family: $custom-font-family
|
font-family: $custom-font-family
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
background: $table-border-color
|
background: $table-border-color
|
||||||
padding: $base-line-height / 4 $base-line-height / 2
|
padding: ($base-line-height / 4) ($base-line-height / 2)
|
||||||
margin: -$base-line-height
|
margin: -$base-line-height
|
||||||
margin-bottom: $base-line-height
|
margin-bottom: $base-line-height
|
||||||
font-size: 100%
|
font-size: 100%
|
||||||
// Sphinx can highlight searched text with ?highlighted=searchterm
|
// Sphinx can highlight searched text with ?highlighted=searchterm
|
||||||
.highlighted
|
.highlighted
|
||||||
background: $highlight-color
|
background: $highlight-color
|
||||||
box-shadow: 0 0 0 $base-line-height / 12 $highlight-color
|
box-shadow: 0 0 0 ($base-line-height / 12) $highlight-color
|
||||||
display: inline
|
display: inline
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
|
|
||||||
@ -289,14 +289,14 @@
|
|||||||
> dt, > dd
|
> dt, > dd
|
||||||
margin-bottom: 0rem
|
margin-bottom: 0rem
|
||||||
dl.footnote
|
dl.footnote
|
||||||
font-size: .9rem
|
font-size: 0.9rem
|
||||||
> dt
|
> dt
|
||||||
margin: 0rem .5rem .5rem 0rem
|
margin: 0rem 0.5rem 0.5rem 0rem
|
||||||
line-height: 1.2rem
|
line-height: 1.2rem
|
||||||
word-break: break-all
|
word-break: break-all
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
> span.brackets
|
> span.brackets
|
||||||
margin-right: .5rem
|
margin-right: 0.5rem
|
||||||
&:before
|
&:before
|
||||||
content: "["
|
content: "["
|
||||||
&:after
|
&:after
|
||||||
@ -304,13 +304,13 @@
|
|||||||
> span.fn-backref
|
> span.fn-backref
|
||||||
font-style: italic
|
font-style: italic
|
||||||
> dd
|
> dd
|
||||||
margin: 0rem 0rem .5rem 0rem
|
margin: 0rem 0rem 0.5rem 0rem
|
||||||
line-height: 1.2rem
|
line-height: 1.2rem
|
||||||
p
|
p
|
||||||
font-size: .9rem
|
font-size: 0.9rem
|
||||||
dl.option-list
|
dl.option-list
|
||||||
kbd
|
kbd
|
||||||
font-size: .9rem
|
font-size: 0.9rem
|
||||||
// Both
|
// Both
|
||||||
html.writer-html4 & table.docutils.citation, table.docutils.footnote,
|
html.writer-html4 & table.docutils.citation, table.docutils.footnote,
|
||||||
html.writer-html5 & dl.footnote
|
html.writer-html5 & dl.footnote
|
||||||
@ -340,7 +340,7 @@
|
|||||||
th > p, td > p
|
th > p, td > p
|
||||||
line-height: 1rem
|
line-height: 1rem
|
||||||
margin-bottom: 0rem
|
margin-bottom: 0rem
|
||||||
font-size: .9rem
|
font-size: 0.9rem
|
||||||
&:not(.field-list)
|
&:not(.field-list)
|
||||||
@extend .wy-table-striped
|
@extend .wy-table-striped
|
||||||
// Remove bottom margin for the last element (and it's last child)
|
// Remove bottom margin for the last element (and it's last child)
|
||||||
@ -395,14 +395,14 @@
|
|||||||
margin-bottom: $base-line-height / 2
|
margin-bottom: $base-line-height / 2
|
||||||
// rST seems to want dds to be treated as the browser would, indented.
|
// rST seems to want dds to be treated as the browser would, indented.
|
||||||
dd
|
dd
|
||||||
margin: 0 0 $base-line-height / 2 $base-line-height
|
margin: 0 0 ($base-line-height / 2) $base-line-height
|
||||||
line-height: $base-line-height
|
line-height: $base-line-height
|
||||||
html.writer-html4 & dl:not(.docutils),
|
html.writer-html4 & dl:not(.docutils),
|
||||||
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
|
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
|
||||||
margin-bottom: $base-line-height
|
margin-bottom: $base-line-height
|
||||||
> dt
|
> dt
|
||||||
display: table
|
display: table
|
||||||
margin: $base-line-height / 4 0
|
margin: ($base-line-height / 4) 0
|
||||||
font-size: 90%
|
font-size: 90%
|
||||||
line-height: normal
|
line-height: normal
|
||||||
background: lighten($class-color, 50%)
|
background: lighten($class-color, 50%)
|
||||||
@ -420,8 +420,8 @@
|
|||||||
dl:not(.field-list) > dt
|
dl:not(.field-list) > dt
|
||||||
margin-bottom: $base-line-height / 4
|
margin-bottom: $base-line-height / 4
|
||||||
border: none
|
border: none
|
||||||
border-left: solid 3px hsl(0,0%,80%)
|
border-left: solid 3px hsl(0, 0%, 80%)
|
||||||
background: hsl(0,0%,94%)
|
background: hsl(0, 0%, 94%)
|
||||||
color: $method-color
|
color: $method-color
|
||||||
.headerlink
|
.headerlink
|
||||||
color: $headerlink-color
|
color: $headerlink-color
|
||||||
@ -481,8 +481,8 @@
|
|||||||
font-size: 80%
|
font-size: 80%
|
||||||
font-weight: 700
|
font-weight: 700
|
||||||
border-radius: $base-line-height / 6
|
border-radius: $base-line-height / 6
|
||||||
padding: $base-line-height / 10 $base-line-height / 4
|
padding: ($base-line-height / 10) ($base-line-height / 4)
|
||||||
margin: auto $base-line-height / 12
|
margin: auto ($base-line-height / 12)
|
||||||
.versionmodified
|
.versionmodified
|
||||||
font-style: italic
|
font-style: italic
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ $fa-font-path: "~font-awesome/fonts"
|
|||||||
$static-img: "../img/"
|
$static-img: "../img/"
|
||||||
|
|
||||||
$nav-content-width: 800px
|
$nav-content-width: 800px
|
||||||
$nav-media-query: (($nav-desktop-width) + ($nav-content-width))
|
$nav-media-query: $nav-desktop-width + $nav-content-width
|
||||||
|
|
||||||
$mathjax-color: $text-color
|
$mathjax-color: $text-color
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user