2013-11-05 14:44:33 +08:00
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
// CONTRIBUTORS, PLEASE READ THIS!
|
|
|
|
// -------------------------------------------------------------------------------------------------------------------
|
|
|
|
// Couple things...
|
|
|
|
// 1. Lots of this @extends from wyrm_core/_type.sass (http://www.github.com/snide/wyrm/.
|
|
|
|
// * Try not to replace any @extends code. It's pretty generic stuff meant to work together.
|
|
|
|
// * That said, know that I'm very unlikely to accept PRs from wyrm just to change style here.
|
|
|
|
// 2. I plan to remove the !importants in here. Part of it is due to lazyness, part to sphinx's fondness for nesting.
|
|
|
|
// 3. Try to use variables from wyrm_core/wy_variables.sass. Notable are...
|
|
|
|
// * $base-line-height // All margins, padding and line-height should use this in .25 increments.
|
2013-11-10 01:52:00 +08:00
|
|
|
// * $text-color, $text-light, $text-dark...etc
|
2013-11-05 14:44:33 +08:00
|
|
|
// * $base-font-family, $custom-font-family, $code-font-family
|
|
|
|
// 4. If you have changes for mobile/tablet, put them at the bottom of the sass file.
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2013-11-04 05:37:56 +08:00
|
|
|
.rst-content
|
2013-11-05 14:44:33 +08:00
|
|
|
// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
|
2013-11-04 05:37:56 +08:00
|
|
|
img
|
2013-11-05 03:45:06 +08:00
|
|
|
max-width: 100%
|
|
|
|
height: auto !important
|
2013-11-05 14:44:33 +08:00
|
|
|
|
2014-01-10 23:32:23 +08:00
|
|
|
div.figure
|
|
|
|
margin-bottom: $base-line-height
|
2015-07-22 10:08:36 +08:00
|
|
|
p.caption
|
|
|
|
font-style: italic
|
2014-01-10 23:32:23 +08:00
|
|
|
|
|
|
|
div.figure.align-center
|
|
|
|
text-align: center
|
|
|
|
|
2013-11-05 14:44:33 +08:00
|
|
|
// Usually it's a good idea to give images some space.
|
2014-11-13 00:45:03 +08:00
|
|
|
.section > img, .section > a > img
|
2013-11-04 05:37:56 +08:00
|
|
|
margin-bottom: $base-line-height
|
2013-11-13 03:06:03 +08:00
|
|
|
// Questionable whether this is nice or not. It styles eternal links, but comes with some baggage.
|
|
|
|
// a.reference.external:after
|
2014-02-06 06:31:41 +08:00
|
|
|
// font-family: FontAwesome
|
2013-11-13 03:06:03 +08:00
|
|
|
// content: " \f08e "
|
|
|
|
// color: $text-light
|
|
|
|
// vertical-align: super
|
|
|
|
// font-size: 60%
|
|
|
|
|
2013-11-05 14:44:33 +08:00
|
|
|
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
|
|
|
|
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.
|
|
|
|
blockquote
|
|
|
|
margin-left: $base-line-height
|
|
|
|
line-height: $base-line-height
|
|
|
|
margin-bottom: $base-line-height
|
2014-03-03 00:16:53 +08:00
|
|
|
.literal-block, pre.literal-block
|
2013-12-04 11:47:56 +08:00
|
|
|
@extend .codeblock
|
2013-11-05 14:44:33 +08:00
|
|
|
// These are the various note pullouts that sphinx applies
|
2014-05-13 23:43:14 +08:00
|
|
|
.note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo
|
2013-11-04 05:37:56 +08:00
|
|
|
@extend .wy-alert
|
2013-11-13 03:01:29 +08:00
|
|
|
.last
|
2013-11-04 05:37:56 +08:00
|
|
|
margin-bottom: 0
|
|
|
|
.admonition-title
|
2013-11-13 03:01:29 +08:00
|
|
|
@extend .wy-alert-title
|
2014-02-01 00:58:37 +08:00
|
|
|
@extend .fa
|
|
|
|
@extend .fa-exclamation-circle
|
2013-11-04 05:37:56 +08:00
|
|
|
&:before
|
|
|
|
margin-right: 4px
|
2013-11-14 00:37:54 +08:00
|
|
|
.note, .seealso
|
2013-11-04 05:37:56 +08:00
|
|
|
@extend .wy-alert.wy-alert-info
|
|
|
|
.hint, .tip, .important
|
2013-11-13 03:01:29 +08:00
|
|
|
@extend .wy-alert.wy-alert-success
|
2013-11-04 05:37:56 +08:00
|
|
|
.error, .danger
|
|
|
|
@extend .wy-alert.wy-alert-danger
|
2014-05-13 23:43:14 +08:00
|
|
|
.warning, .caution, .attention, .admonition-todo
|
2013-11-04 05:37:56 +08:00
|
|
|
@extend .wy-alert.wy-alert-warning
|
2013-11-07 05:21:13 +08:00
|
|
|
// Some people put tables in notes. Let's give them very basic support.
|
|
|
|
.admonition table
|
|
|
|
border-color: rgba(0,0,0,.1)
|
|
|
|
td, th
|
|
|
|
background: transparent !important
|
|
|
|
border-color: rgba(0,0,0,.1) !important
|
2013-11-08 02:24:58 +08:00
|
|
|
.section ul, .toctree-wrapper ul
|
2013-11-04 05:37:56 +08:00
|
|
|
@extend .wy-plain-list-disc
|
2013-11-08 02:24:58 +08:00
|
|
|
.section ol.loweralpha, .section ol.loweralpha li
|
|
|
|
list-style: lower-alpha
|
|
|
|
.section ol.upperalpha, .section ol.upperalpha li
|
|
|
|
list-style: upper-alpha
|
|
|
|
.section ol, ol.arabic
|
2013-11-04 05:37:56 +08:00
|
|
|
@extend .wy-plain-list-decimal
|
2013-11-08 02:24:58 +08:00
|
|
|
.section ol p, .section ul p
|
|
|
|
margin-bottom: $base-line-height / 2
|
|
|
|
.line-block
|
|
|
|
margin-left: $base-line-height
|
2013-11-05 14:44:33 +08:00
|
|
|
|
|
|
|
// Generics handling of headings and toc stuff.
|
2013-11-04 05:37:56 +08:00
|
|
|
.topic-title
|
|
|
|
font-weight: bold
|
|
|
|
margin-bottom: $base-line-height / 2
|
|
|
|
.toc-backref
|
|
|
|
color: $text-color
|
|
|
|
.align-right
|
|
|
|
float: right
|
|
|
|
margin: 0px 0px $base-line-height $base-line-height
|
|
|
|
.align-left
|
|
|
|
float: left
|
|
|
|
margin: 0px $base-line-height $base-line-height 0px
|
2013-11-10 01:52:00 +08:00
|
|
|
.align-center
|
|
|
|
margin: auto
|
|
|
|
display: block
|
2015-07-22 10:08:36 +08:00
|
|
|
.toctree-wrapper p.caption
|
2015-05-05 05:52:26 +08:00
|
|
|
@extend h2
|
2013-11-05 14:44:33 +08:00
|
|
|
|
|
|
|
// This is the #href that shows up on hover. Sphinx's is terrible so I hack it away.
|
2015-04-23 09:31:00 +08:00
|
|
|
h1, h2, h3, h4, h5, h6, dl dt, p.caption
|
2013-11-04 05:37:56 +08:00
|
|
|
.headerlink
|
|
|
|
display: none
|
|
|
|
visibility: hidden
|
|
|
|
font-size: 14px
|
2014-02-01 00:58:37 +08:00
|
|
|
@extend .fa
|
2013-11-04 05:37:56 +08:00
|
|
|
&:after
|
|
|
|
visibility: visible
|
|
|
|
content: "\f0c1"
|
2014-02-06 06:31:41 +08:00
|
|
|
font-family: FontAwesome
|
2013-11-04 05:37:56 +08:00
|
|
|
display: inline-block
|
|
|
|
&:hover .headerlink
|
|
|
|
display: inline-block
|
|
|
|
|
2013-11-05 14:44:33 +08:00
|
|
|
// Sidebar content. You'll see at the bottom of this file I change it in mobile.
|
2013-11-05 03:45:06 +08:00
|
|
|
.sidebar
|
|
|
|
float: right
|
|
|
|
width: 40%
|
|
|
|
display: block
|
|
|
|
margin: 0 0 $base-line-height $base-line-height
|
|
|
|
padding: $base-line-height
|
2015-07-26 02:01:18 +08:00
|
|
|
background: $sidebar-background-color
|
|
|
|
border: solid 1px $sidebar-border-color
|
2013-11-05 14:44:33 +08:00
|
|
|
// Sidebar content is usually less relevant, so adjust the margins and sizes.
|
2013-11-05 03:45:06 +08:00
|
|
|
p, ul, dl
|
|
|
|
font-size: 90%
|
|
|
|
.last
|
|
|
|
margin-bottom: 0
|
|
|
|
.sidebar-title
|
|
|
|
display: block
|
|
|
|
font-family: $custom-font-family
|
|
|
|
font-weight: bold
|
|
|
|
background: $table-border-color
|
|
|
|
padding: $base-line-height / 4 $base-line-height / 2
|
|
|
|
margin: -$base-line-height
|
|
|
|
margin-bottom: $base-line-height
|
|
|
|
font-size: 100%
|
2013-11-06 03:54:34 +08:00
|
|
|
// Sphinx can highlight searched text with ?highlighted=searchterm
|
|
|
|
.highlighted
|
2015-07-26 02:01:18 +08:00
|
|
|
background: $highlight-color
|
2013-11-06 03:54:34 +08:00
|
|
|
display: inline-block
|
|
|
|
font-weight: bold
|
|
|
|
padding: 0 $base-line-height / 4
|
2013-11-05 03:45:06 +08:00
|
|
|
|
2013-11-05 14:44:33 +08:00
|
|
|
// These are the little citation links [1] that show up within paragraphs.
|
|
|
|
.footnote-reference, .citation-reference
|
|
|
|
vertical-align: super
|
|
|
|
font-size: 90%
|
2013-11-05 06:14:48 +08:00
|
|
|
|
2013-11-05 14:44:33 +08:00
|
|
|
// Tables! Sphinx LOVES TABLES. Most of wyrm assumes you're only going to use a table as a table
|
|
|
|
// so I have to write a bunch of unique stuff for Sphinx to style them up differently like it's 2003.
|
2013-11-05 06:14:48 +08:00
|
|
|
table.docutils.citation, table.docutils.footnote
|
|
|
|
background: none
|
|
|
|
border: none
|
|
|
|
color: $gray-light
|
|
|
|
td, tr
|
|
|
|
border: none
|
|
|
|
background-color: transparent !important
|
|
|
|
white-space: normal
|
|
|
|
td.label
|
|
|
|
padding-left: 0
|
|
|
|
padding-right: 0
|
|
|
|
vertical-align: top
|
2015-07-18 01:30:53 +08:00
|
|
|
code
|
|
|
|
color: $gray
|
2013-11-05 14:44:33 +08:00
|
|
|
table.docutils
|
|
|
|
@extend .wy-table
|
|
|
|
@extend .wy-table-bordered-all
|
|
|
|
&:not(.field-list)
|
|
|
|
@extend .wy-table-striped
|
|
|
|
// This table is what gets spit out for auto-generated API stuff. I style it smaller bits of padding.
|
2013-11-07 05:12:34 +08:00
|
|
|
table.field-list
|
2013-11-04 05:37:56 +08:00
|
|
|
@extend .wy-table
|
|
|
|
border: none
|
|
|
|
td
|
|
|
|
border: none
|
2013-12-17 03:41:35 +08:00
|
|
|
padding-top: 5px
|
2014-03-13 13:14:26 +08:00
|
|
|
td > strong
|
|
|
|
display: inline-block
|
|
|
|
margin-top: 3px
|
2013-11-04 05:37:56 +08:00
|
|
|
.field-name
|
2013-11-07 05:12:34 +08:00
|
|
|
padding-right: 10px
|
2013-11-04 05:37:56 +08:00
|
|
|
text-align: left
|
2013-11-10 01:52:00 +08:00
|
|
|
white-space: nowrap
|
2013-11-04 05:37:56 +08:00
|
|
|
.field-body
|
|
|
|
text-align: left
|
|
|
|
padding-left: 0
|
2013-11-05 14:44:33 +08:00
|
|
|
|
|
|
|
// These are the "literals" that get spit out when you mark stuff as ``code`` as your write.
|
2015-03-27 07:49:22 +08:00
|
|
|
tt, code
|
2013-11-05 14:44:33 +08:00
|
|
|
@extend code
|
|
|
|
color: $black
|
|
|
|
big, em
|
|
|
|
font-size: 100% !important
|
|
|
|
line-height: normal
|
|
|
|
|
2015-07-18 05:16:57 +08:00
|
|
|
&.literal
|
|
|
|
color: $text-code-color
|
|
|
|
&.xref, a &
|
2013-11-05 14:44:33 +08:00
|
|
|
font-weight: bold
|
2015-07-26 02:01:18 +08:00
|
|
|
color: $text-codexref-color
|
2014-02-01 06:27:23 +08:00
|
|
|
// If the literal is inside an a tag, let's color it like a link
|
2015-04-23 08:27:29 +08:00
|
|
|
a tt, a code
|
2014-02-01 06:27:23 +08:00
|
|
|
color: $link-color
|
2013-11-08 02:24:58 +08:00
|
|
|
dl
|
|
|
|
margin-bottom: $base-line-height
|
|
|
|
dt
|
|
|
|
font-weight: bold
|
|
|
|
// Most of the content within these dls are one liners, so I halve the normal margins.
|
|
|
|
p, table, ul, ol
|
|
|
|
margin-bottom: $base-line-height / 2 !important
|
|
|
|
// rST seems to want dds to be treated as the browser would, indented.
|
|
|
|
dd
|
|
|
|
margin: 0 0 $base-line-height / 2 $base-line-height
|
2013-11-05 14:44:33 +08:00
|
|
|
// This is what Sphinx spits out for it's autodocs. Depending upon what language the person is referencing
|
|
|
|
// these things usually have a class of "method" or "class" or something similar, but really who knows.
|
|
|
|
// Sphinx doesn't give me a generic class on these, so unfortunately I have to apply it to the root dl.
|
|
|
|
// This makes me terribly unhappy and makes this code very nesty. Unfortunately I've seen hand-written docs
|
|
|
|
// that output similar, but not quite the same nesting so this is really the best we can do.
|
2013-11-08 02:24:58 +08:00
|
|
|
dl:not(.docutils)
|
2013-11-07 04:55:08 +08:00
|
|
|
margin-bottom: $base-line-height
|
2013-11-05 14:44:33 +08:00
|
|
|
// This would be the equivilant of a .. class::
|
2013-11-04 12:32:56 +08:00
|
|
|
dt
|
|
|
|
display: inline-block
|
|
|
|
margin: $base-line-height / 4 0
|
2013-11-05 08:37:01 +08:00
|
|
|
font-size: 90%
|
2013-11-04 12:32:56 +08:00
|
|
|
line-height: normal
|
2015-07-26 02:01:18 +08:00
|
|
|
background: lighten($class-color, 50%)
|
|
|
|
color: $class-color
|
|
|
|
border-top: solid 3px lighten($class-color, 20%)
|
2013-11-04 12:32:56 +08:00
|
|
|
padding: $base-line-height / 4
|
2013-11-07 04:44:22 +08:00
|
|
|
position: relative
|
2013-11-05 14:44:33 +08:00
|
|
|
&:before
|
2015-07-26 02:01:18 +08:00
|
|
|
color: lighten($class-color, 20%)
|
2013-11-04 12:32:56 +08:00
|
|
|
.headerlink
|
|
|
|
color: $text-color
|
|
|
|
font-size: 100% !important
|
2013-11-05 14:44:33 +08:00
|
|
|
// And this would be the .. method::
|
|
|
|
dl dt
|
|
|
|
margin-bottom: $base-line-height / 4
|
|
|
|
border: none
|
|
|
|
border-left: solid 3px hsl(0,0%,80%)
|
|
|
|
background: hsl(0,0%,94%)
|
2015-07-26 02:01:18 +08:00
|
|
|
color: $method-color
|
2013-11-05 14:44:33 +08:00
|
|
|
.headerlink
|
2015-07-26 02:01:18 +08:00
|
|
|
color: $headerlink-color
|
2013-11-05 14:44:33 +08:00
|
|
|
font-size: 100% !important
|
|
|
|
dt:first-child
|
|
|
|
margin-top: 0
|
|
|
|
// Since dts get the callout style, we treat this less as callouts.
|
2015-03-27 07:49:22 +08:00
|
|
|
tt, code
|
2013-11-05 14:44:33 +08:00
|
|
|
font-weight: bold
|
2013-11-05 08:37:01 +08:00
|
|
|
&.descname, &.descclassname
|
|
|
|
background-color: transparent
|
2013-11-05 09:12:21 +08:00
|
|
|
border: none
|
|
|
|
padding: 0
|
2013-11-05 09:02:22 +08:00
|
|
|
font-size: 100% !important
|
2013-11-05 08:37:01 +08:00
|
|
|
&.descname
|
|
|
|
font-weight: bold
|
2013-11-06 04:42:09 +08:00
|
|
|
// This is for more advanced parameter control
|
|
|
|
.optional
|
|
|
|
display: inline-block
|
|
|
|
padding: 0 4px
|
|
|
|
color: $black
|
|
|
|
font-weight: bold
|
|
|
|
.property
|
|
|
|
display: inline-block
|
|
|
|
padding-right: 8px
|
2013-12-04 11:47:56 +08:00
|
|
|
// Doc links to sourcecode
|
|
|
|
.viewcode-link, .viewcode-back
|
|
|
|
display: inline-block
|
2015-07-26 02:01:18 +08:00
|
|
|
color: $text-viewcode-color
|
2013-12-04 11:47:56 +08:00
|
|
|
font-size: 80%
|
|
|
|
padding-left: $base-line-height
|
|
|
|
.viewcode-back
|
|
|
|
display: block
|
|
|
|
float: right
|
2014-04-26 05:26:03 +08:00
|
|
|
p.rubric
|
|
|
|
margin-bottom: 12px
|
|
|
|
font-weight: bold
|
2014-11-03 15:34:06 +08:00
|
|
|
//Download link
|
|
|
|
code.download
|
|
|
|
background: inherit
|
|
|
|
padding: inherit
|
|
|
|
font-family: inherit
|
|
|
|
font-size: inherit
|
|
|
|
color: inherit
|
|
|
|
border: inherit
|
|
|
|
white-space: inherit
|
|
|
|
span:first-child
|
|
|
|
@extend .fa
|
|
|
|
@extend .fa-download
|
|
|
|
&:before
|
|
|
|
margin-right: 4px
|
2013-11-05 08:37:01 +08:00
|
|
|
|
2013-11-05 14:44:33 +08:00
|
|
|
// Mobile specific
|
2013-11-05 03:45:06 +08:00
|
|
|
+media($mobile)
|
|
|
|
.rst-content
|
|
|
|
.sidebar
|
|
|
|
width: 100%
|