/***************************************************** * cloud.css_t * ~~~~~~~~~~~ * * stylesheet for "Cloud" theme for Sphinx. * * :copyright: Copyright 2011-2012 by Assurance Technologies * :license: BSD * *****************************************************/ @import url("basic.css"); {#********************************************** # helper for accumulating warnings, which we hack into document via css. # submitting sphinx issue (https://github.com/sphinx-doc/sphinx/issues/2157) # in hopes of having a better way to warn user in the future. #**********************************************#} {% set _warnings = [] %} {% macro css_warning(message) %} {% set _ = _warnings.append(message) %} {% endmacro %} {% macro render_css_warnings() %} {% if _warnings %} {% set text = "cloud_sptheme errors:\n\u00B7 " + "\n\u00B7 ".join(_warnings) %} body:before { content: " {{ text.replace('\\', '\\\\').replace('\n', '\\000A').replace('"', '\\"') }} "; position: absolute; left: 0; right: 0; top: 0; z-index: 1000; display: block; padding: 1em; background: black; border: 2px solid red; font-size: 1.5em; line-height: 1.5; color: red; white-space: pre-wrap; } {% endif %} {% endmacro %} {#********************************************** # variable init #**********************************************#} {# legacy aliases #} {% if theme_lighter_decor|trim %} {% set theme_lighter_header_decor = theme_lighter_decor %} {% endif %} {% if theme_beveled_decor|trim %} {% set theme_shaded_decor = theme_beveled_decor %} {% endif %} {% if theme_sidebar_button_bg_hover|trim %} {% set theme_sidebar_link_hover_bg_color = theme_sidebar_button_bg_hover %} {% endif %} {% if theme_relbar_link_bg|trim %} {% set theme_relbar_link_bg_color = theme_relbar_link_bg %} {% endif %} {# default values #} {% if not theme_sidebar_link_hover_text_color|trim %} {% set theme_sidebar_link_hover_text_color = theme_link_hover_text_color %} {% endif %} {% if not theme_sidebar_link_hover_bg_color|trim %} {% set theme_sidebar_link_hover_bg_color = theme_link_hover_bg_color %} {% endif %} {% if not theme_sidebar_link_hover_trim_color|trim %} {% set theme_sidebar_link_hover_trim_color = theme_link_hover_trim_color %} {% endif %} {% if not theme_large_sidebar_width|trim %} {% set theme_large_sidebar_width = theme_sidebarwidth %} {% endif %} {# NOTE: could make the following configurable via theme, just trying not to multiply the number of configuration vars until needed :) #} {% set theme_relbar_link_hover_text_color = theme_sidebar_link_hover_text_color %} {# NOTE: theme_relbar_link_bg_hover is depcrecated... #} {% set theme_relbar_link_hover_bg_color = (theme_relbar_link_bg_hover|trim) or theme_sidebar_link_hover_bg_color %} {% set theme_relbar_link_hover_trim_color = theme_sidebar_link_hover_trim_color %} {% set theme_toc_hover_text_color = theme_sidebar_link_hover_text_color %} {% set theme_toc_hover_bg_color = theme_sidebar_link_hover_bg_color %} {% set theme_toc_hover_trim_color = theme_sidebar_link_hover_trim_color %} {% if not theme_headlinkcolor|trim %} {% set theme_headlinkcolor = theme_linkcolor %} {% endif %} {% if not theme_headtrimcolor|trim %} {% set theme_headtrimcolor = theme_headtextcolor %} {% endif %} {% if not theme_sectionbgcolor|trim %} {% set theme_sectionbgcolor = theme_headtrimcolor %} {% endif %} {% if not theme_rubricbgcolor|trim %} {% set theme_rubricbgcolor = theme_sectionbgcolor %} {% endif %} {% set default_toc_local_text_color = "" %} {% set default_toc_local_trim_color = theme_toc_hover_trim_color %} {% if theme_toc_local_bg_color|trim == "section" %} {% set theme_toc_local_bg_color = theme_sectionbgcolor %} {% if theme_sectiontextcolor == "inherit" %} {% set default_toc_local_text_color = theme_textcolor %} {% else %} {% set default_toc_local_text_color = theme_sectiontextcolor %} {% endif %} {% set default_toc_local_trim_color = theme_sectiontrimcolor %} {% elif theme_toc_local_bg_color|trim == "default" %} {% set theme_toc_local_bg_color = "" %} {% endif %} {% if theme_toc_local_text_color|trim == "default" %} {% set theme_toc_local_text_color = default_toc_local_text_color %} {% endif %} {% if theme_toc_local_trim_color|trim == "default" %} {% set theme_toc_local_trim_color = default_toc_local_trim_color %} {% endif %} {% if theme_toc_current_text_color|trim == "default" %} {% set theme_toc_current_text_color = theme_toc_hover_text_color %} {% endif %} {# helper based on location of sidebar #} {% if theme_rightsidebar | tobool %} {% set sidebar_side = "right" %} {% set sidebar_opp = "left" %} {% else %} {% set sidebar_side = "left" %} {% set sidebar_opp = "right" %} {% endif %} {#********************************************** # helper macros for accumulating media-specific rules # from throughout the code, and then rendering them under one location at end. #**********************************************#} {% set _media_rules = {} %} {% macro on_media(section, content=None) %} {% if content is none %}{% set content = caller() %}{% endif %} {% set _ = _media_rules.setdefault(section, []).append(content) %} {% endmacro %} {% macro on_xlarge_screen() %} {{ on_media("xlarge_screen", caller()) }} {% endmacro %} {% macro on_large_screen() %} {{ on_media("large_screen", caller()) }} {% endmacro %} {% macro on_medium_or_small_screen() %} {{ on_media("medium_or_small_screen", caller()) }} {% endmacro %} {% macro on_medium_up_screen() %} {{ on_media("medium_up_screen", caller()) }} {% endmacro %} {% macro on_small_screen() %} {{ on_media("small_screen", caller()) }} {% endmacro %} {% macro on_print_media() %} {{ on_media("print", caller()) }} {% endmacro %} {% macro render_media_rules(section) %} {{ "\n".join(_media_rules.get(section, [])) }} {% endmacro %} {#********************************************** # helper macros for rendering semi-standard css3 keywords, # e.g. border-radius #**********************************************#} {# helper to convert various font sizes to float EM value #} {%- macro size_to_em(value, rem_per_em=1) %} {% if value is string %} {% set value = value|trim %} {% if value|float(-999) != -999 %} {{ value }} {% elif value.endswith("px") %} {{ value[:-2]|float / (px_per_rem * rem_per_em) }} {% elif value.endswith("em") %} {{ value[:-2] }} {% elif value.endswith("%") %} {{ value[:-1]|float / 100 }} {% else %} {# XXX: could add 'param' keyword to provide context #} {{ css_warning("cloud.css_t: can't parse float value: %r"|format(value)) }} {% endif %} {% else %} {{ value }} {% endif %} {%- endmacro %} {% set px_per_rem = 16 %} {% set text_size_em = size_to_em(theme_default_layout_text_size)|float %} {% if not text_size_em %} {# detect issue 23 #} {{ css_warning("theme.conf: invalid/null default_layout_text_size: %r"|format(theme_default_layout_text_size)) }} {% set text_size_em = 1 %} {% endif %} {% set px_per_rem = px_per_rem * text_size_em %} {% set bl_height = size_to_em(theme_bodylineheight)|float -%} {# base line height, in rems #} {# hacked attempt to autocalculate margins & line size for various headers, etc #} {%- macro box_typography(font_height, vert_margin=2, align=0.5, set_line=True, set_size=True, horiz_margin=0, vert_padding=0, border_padding=0) -%} {%- set font_height = size_to_em(font_height)|float -%} {# header font size, in rems #} {% if vert_padding is string or vert_padding is not sequence %} {% set vert_padding = [vert_padding, vert_padding] %} {% endif %} {%- set top_padding, bottom_padding = vert_padding %} {%- set top_padding = size_to_em(top_padding, rem_per_em=font_height)|float + size_to_em(border_padding, rem_per_em=font_height)|float /2 -%} {# externally controlled header padding, in header ems #} {%- set bottom_padding = size_to_em(bottom_padding, rem_per_em=font_height)|float + size_to_em(border_padding, rem_per_em=font_height)|float /2 -%} {# externally controlled header padding, in header ems #} {% if horiz_margin is string or not horiz_margin is sequence %} {% set horiz_margin = [horiz_margin, horiz_margin] %} {% endif %} {%- set hl_height = (font_height / bl_height)|round(0, "ceil") * bl_height / font_height -%} {# debug helper -- content: "hl_height {{ hl_height }}; padding {{ vert_padding }}; vert_margin {{ vert_margin }}"; #} {%- if set_line and set_size -%} font-size: {{ font_height }}em; {% endif -%} {%- if set_line -%} line-height: {{ hl_height }}em; {% endif -%} margin: {{ (hl_height * vert_margin * align - top_padding)|round(3) }}em {{ horiz_margin[0] }} {{ (hl_height * vert_margin * (1-align) - bottom_padding)|round(3) }}em {{ horiz_margin[1] }}; {% endmacro -%} {# macro for rendering rule with vendor-specific prefix #} {% macro experimental(keyword, value) %} {% if value %} -moz-{{ keyword }}: {{ value }}; -webkit-{{ keyword }}: {{ value }}; -o-{{ keyword }}: {{ value }}; -ms-{{ keyword }}: {{ value }}; {{ keyword }}: {{ value }}; {% endif %} {% endmacro %} {% macro border_radius(value) -%} {{ experimental("border-radius", value) }} {% endmacro %} {% macro box_shadow(value) -%} {{ experimental("box-shadow", value) }} {% endmacro %} {% macro box_sizing(value) -%} {{ experimental("box-sizing", value) }} {% endmacro %} {% macro opacity(value) -%} filter: progid:DXImageTransform.Microsoft.Alpha(Opacity= {{ (value|float*100)|round|int }}); opacity: {{ value }}; {% endmacro %} {% macro vert_gradient(stops) %} background-image: -moz-linear-gradient({{ stops }}); background-image: -webkit-linear-gradient({{ stops }}); background-image: linear-gradient({{ stops }}); {% endmacro %} {% macro horiz_gradient(stops) %} background-image: -moz-linear-gradient(left, {{ stops }}); background-image: -webkit-linear-gradient(left, {{ stops }}); background-image: linear-gradient(left, {{ stops }}); background-image: linear-gradient(to right, {{ stops }}); {% endmacro %} {% set button_box_shadow = box_shadow("1px 1px 2px -1px rgba(0,0,0,0.5)") %} {% set soft_corner_radius = "3px" %} {% set round_corner_radius = "10px" %} {# hack to parse sphinx version info into tuple could probably do this by registering filter, but wanted to try :) #} {% set sphinx_version_info = [] %} {% set state = dict(buf="", end=false) %} {% for char in (sphinx_version + ".") %} {% if state['end'] %} {% elif char.isdigit() %} {% set _ = state.update(buf=state['buf'] + char) %} {% else %} {% if state['buf'] %} {% set _ = sphinx_version_info.append(state['buf']|int) %} {% set _ = state.update(buf="") %} {% endif %} {% if char != "." %} {% set _ = state.update(end=true) %} {% endif %} {% endif %} {% endfor %} {#**************************************************** # page layout - body #***************************************************#} {% set body_margin = "1em" %} * { box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; } body { padding: 0; color: #000; font-family: {{ theme_bodyfont }}; font-size: {{ theme_default_layout_text_size }}; line-height: {{ theme_bodylineheight }}; {% if theme_borderless_decor | tobool %} margin: 0; background: {{ theme_bgcolor }}; {% else %} margin: {{ body_margin }} {{ body_margin }} 0; background: {{ theme_footerbgcolor }}; background-attachment: fixed; {% endif %} } {% if theme_minimal_layout_text_size %} {% call on_small_screen() %} body { font-size: {{ theme_minimal_layout_text_size }}; } {% endcall %} {% endif %} {% if not theme_borderless_decor | tobool %} {% call on_medium_or_small_screen() %} body { margin: 0; } {% endcall %} {% endif %} {% if theme_large_layout_text_size %} {% call on_xlarge_screen() %} body { font-size: {{ theme_large_layout_text_size }}; } {% endcall %} {% endif %} {#**************************************************** # page layout - relbars (top & bottom) #***************************************************#} {% if theme_borderless_decor | tobool %} div.relbar-top, div.relbar-bottom { background: {{ theme_relbarbgcolor }}; padding: 0 {{ body_margin }}; } {% call on_medium_or_small_screen() %} div.relbar-top, div.relbar-bottom { padding: 0; } {% endcall %} {% endif %} div.related { margin: 0 auto; max-width: {{ theme_max_width }}; background: {{ theme_relbarbgcolor }}; line-height: {{ theme_bodylineheight }}; padding: .75em 0; color: {{ theme_relbartextcolor }}; text-shadow: 1px 1px 1px rgba(0,0,0,.3); {% if theme_borderless_decor | tobool %} background: none; {% endif %} {% if theme_shaded_decor|tobool %} {{ vert_gradient("rgba(255,255,255,.2), rgba(255,255,255,0)") }} border-width: 0 2px 3px 1px; {% endif %} } div.relbar-top div.related { {{ border_radius(".7em .7em 0 0") }} } div.relbar-bottom div.related { {{ border_radius("0 0 .7em .7em") }} {% if theme_shaded_decor|tobool %} {{ vert_gradient("rgba(255,255,255,.2), rgba(255,255,255,0.1)") }} border-width: 1px 2px 0 1px; {% endif %} } {# remove margin & rounded corners on small/medium screens #} {% if not theme_borderless_decor | tobool %} {% call on_medium_or_small_screen() %} div.relbar-top div.related, div.relbar-bottom div.related { {{ border_radius("0") }} } {% endcall %} {% endif %} div.related a { display: inline-block; padding: 0.3em 0.6em; {{ border_radius("0.8em") }} font-weight: bold; color: {{ theme_relbarlinkcolor }}; border: 1px solid transparent; } div.related li.right a { background: {{ theme_relbar_link_bg_color }}; font-weight: normal; } div.related a:hover, div.related li.right a:hover { background: {{ theme_relbar_link_hover_bg_color }}; color: {{ theme_relbar_link_hover_text_color }}; border-color: {{ theme_relbar_link_hover_trim_color }}; text-decoration: none; text-shadow: none; {{ button_box_shadow }} } {% call on_small_screen() %} {# tweak relbar - emphasize title, hide crumbs #} div.related > ul > li.right + li:not(.right) { font-weight: bold; } div.related > ul > li:not(.right) + li { display: none; } {% endcall %} {#**************************************************** # page layout - document #***************************************************#} div.document { {# note: relative used by div.sidebar-toggle-group #} position: relative; margin: 0 auto; max-width: {{ theme_max_width }}; background: {{ theme_sidebarbgcolor }}; {% if theme_borderless_decor | tobool %} background: {{ theme_bgcolor }}; {% endif %} } {% if theme_small_sidebar_bg_color|trim %} {% call on_small_screen() %} div.document { background: {{ theme_small_sidebar_bg_color }}; } {# for borderless mode #} div.sphinxsidebar { background: transparent; border: 0; } {% endcall %} {% endif %} div.documentwrapper { float: left; width: 100%; } div.bodywrapper { {%- if theme_rightsidebar|tobool %} margin: 0 {{ theme_large_sidebar_width }} 0 0; {% else %} margin: 0 0 0 {{ theme_large_sidebar_width }}; {% endif %} } {% call on_small_screen() %} div.bodywrapper { margin-{{ sidebar_side }}: 0; } {% endcall %} {% if theme_large_sidebar_width != theme_sidebarwidth %} {% call on_medium_or_small_screen() %} div.bodywrapper { {%- if theme_rightsidebar|tobool %} margin: 0 {{ theme_sidebarwidth }} 0 0; {% else %} margin: 0 0 0 {{ theme_sidebarwidth }}; {% endif %} } {% endcall %} {% endif %} div.document.sidebar-hidden div.bodywrapper { margin-{{ sidebar_side }}: 0; } div.body { min-height: {{ theme_min_height }}; {# note: this ^ is just a hack to prevent body from being shorter than sidebar #} {# line height debugging -- background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAVCAYAAABsZT8HAAAAFElEQVQImWNgGIKgvLz8PwMDAwMAD3sCZXNDKtkAAAAASUVORK5CYII=") repeat scroll 0 0 transparent; #} background-color: {{ theme_bgcolor }}; border-{{ sidebar_side }}: 1px solid {{ theme_bodytrimcolor }}; {% if not theme_borderless_decor|tobool %} {% if theme_rightsidebar|tobool %} {{ box_shadow("1px 0 2px " + theme_bodytrimcolor) }} {% else %} {{ box_shadow("-1px 0 2px " + theme_bodytrimcolor) }} {% endif %} {% endif %} line-height: {{ theme_bodylineheight }}; color: {{ theme_textcolor }}; padding: 30px 20px; {% if theme_borderless_decor | tobool %} border-width: 0; {% endif %} {# override min/max width from sphinx 1.8 -- blocks our dynamic layout #} {# XXX: maybe allow the min-width:450px back in, or something similar, at least for medium-up layout? #} min-width: 0; max-width: none; } {% call on_print_media() %} div.body { border: 0; {{ box_shadow("none") }} } {% endcall %} {#**************************************************** # page layout - sidebar # # NOTE: sidebar visibility is controlled by two classes, # which are set on div.document by the JS code... # * sidebar-hidden -- hide sidebar on medium-up media # (default is to shown sidebar on medium-up media) # * document-hidden -- show sidebar and hide content on small media # (default is to hide sidebar & show content on small media) #***************************************************#} {% set sidebar_top_margin = "0" %} {% if theme_borderless_decor|tobool and theme_sidebarbgcolor != "transparent" %} {% set sidebar_top_margin = "16px" %} {% endif %} div.sphinxsidebar { margin-top: {{ sidebar_top_margin }}; width: {{ theme_large_sidebar_width }}; {%- if theme_rightsidebar|tobool %} float: right; {%- endif %} font-size: 90%; line-height: 1.25em; {% if theme_borderless_decor|tobool %} margin-bottom: 16px; {{ box_sizing("border-box") }} background: {{ theme_sidebarbgcolor }}; border: 1px solid {{ theme_bodytrimcolor }}; {{ border_radius("0.7em") }} {{ box_shadow("1px 1px 1px " + theme_bodytrimcolor) }} {% if theme_shaded_decor|tobool %} {{ horiz_gradient("rgba(0,0,0,.05), rgba(255,255,255,.04), rgba(0,0,0,.05)") }} border-style: dotted solid solid dotted; {% endif %} {% endif %} } {% if theme_large_sidebar_width != theme_sidebarwidth %} {% call on_medium_or_small_screen() %} div.sphinxsidebar { width: {{ theme_sidebarwidth }}; } {% endcall %} {% endif %} {% call on_small_screen() %} div.document:not(.document-hidden) div.sphinxsidebar, div.document.document-hidden div.documentwrapper { display: none; } div.document.document-hidden div.sphinxsidebar { width: 100%; margin: 0; border: 0; border-radius: 0; } {% endcall %} div.document.sidebar-hidden div.sphinxsidebar { display: none; } div.sphinxsidebarwrapper { padding: 1em 0 0 10px; } div.sphinxsidebar h3, div.sphinxsidebar h4 { padding: 0; margin: 24px 16px 0 0; font-family: {{ theme_headfont }}; font-weight: normal; color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar h3 { font-size: 1.4em; } div.sphinxsidebar h4 { font-size: 1.3em; } div.sphinxsidebar h3 a, div.sphinxsidebar h4 a { color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar p { color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar p.topless { margin: 5px 10px 10px 10px; } div.sphinxsidebar ul { margin: 10px; margin-right: 0; padding: 0; color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar a { color: {{ theme_sidebarlinkcolor }}; border: 1px solid transparent; border-width: 1px 0; } div.sphinxsidebar a:hover { color: {{ theme_link_hover_text_color }}; background: {{ theme_link_hover_bg_color }}; border-color: {{ theme_link_hover_trim_color }}; text-decoration: none; } div.sphinxsidebar ul li a { overflow: hidden; white-space: nowrap; } div.sphinxsidebar ul li a:hover { {# XXX: need something so that overflow bg is on top of document. wanted inline-block, but causes height jumps. #} display: inline-table; min-width: 98%; min-width: calc(100% - 5px); {# outline: 2px solid {{theme_sidebarbgcolor}};#} } div.sphinxsidebar a:active { color: {{ theme_sidebartextcolor }}; } div.sphinxsidebar p.logo { margin: 1em 0 0 -10px; text-align: center; max-width: 100%; } div.sphinxsidebar p.logo a { display: inline-block; {{ border_radius(soft_corner_radius) }} } {# fix margin if h3/h4 is at top of sidebar -- # consequence of sidebar boxes not all being wrapped in divs. #} div.sphinxsidebarwrapper > h3:first-child, div.sphinxsidebarwrapper > h4:first-child, div.sphinxsidebarwrapper > div:first-child > h3:first-child, div.sphinxsidebarwrapper > div:first-child > h4:first-child { margin-top: .2em; } {#**************************************************** # page layout - sidebar TOC sections # # NOTE: classes not marked as "set by sphinx" are autopopulated by js code. # # UL nodes conditionally have the following classes applied: # * current -- if UL contains active page, or is toplevel of active page # [set by sphinx] # # LI nodes conditionally have the following classes applied: # * current -- set for root node down to toplevel of current page. # [set by sphinx] # * local -- if LI > A points to current page # * child -- if LI > A points to child of current page # * active -- if LI is part of current page, and this section # (or child) is marked as the .focus # * focus -- LI is currently focused section (implies .active) # * toc-toggle -- marked by JS code when TOC section will be expanded/collapsed # * closed -- used to mark toc-toggle section that's collapsed # # LIs for other pages contained w/in active page will not have .active-section #***************************************************#} {# sidebar link lists #} div.sphinxsidebar ul, div.sphinxsidebar ul ul, div.sphinxprev p.topless, div.sphinxnext p.topless { list-style: none; margin-left: 0; } div.sphinxsidebar ul ul { margin-left: 1.5em; } {# sidebar links #} div.sphinxsidebar ul a, div.sphinxprev a, div.sphinxnext a { position: relative; display: block; padding: 1px 4px 3px 5px; margin: 0 5px 0 0; border: 1px solid transparent; {{ border_radius(soft_corner_radius) }} } {# hovered sidebar links #} div.sphinxsidebar ul a:hover, div.sphinxprev a:hover, div.sphinxnext a:hover { background: {{ theme_toc_hover_bg_color }}; border-color: {{ theme_toc_hover_trim_color }}; color: {{ theme_toc_hover_text_color }}; text-decoration: none; } {# make links to other page look slightly different #} div.sphinx-toc ul a:not([href^="#"]):hover { position: relative; overflow: visible; {# required for chome #} } div.sphinx-toc ul a:not([href^="#"]):hover:before { content: "⇒"; position: absolute; right: 100%; font-size: 1.5em; margin-right: 4px; opacity: 0.7; } {# global toc -- current page #} {% if theme_toc_local_bg_color %} {# highlight the current page's LI box #} .sphinxglobaltoc li.current.active { background: {{ theme_toc_local_bg_color }}; margin-left: -7px; padding: 6px 0 6px 3px; border: 1px solid {{ theme_toc_local_trim_color or theme_toc_hover_trim_color }}; border-width: 0 0 0 4px; {{ border_radius("6px") }} } {# highlight the current page title link #} .sphinxglobaltoc li.current.active > a { font-weight: bold; } {% call on_small_screen() %} {# merge into left side #} .sphinxglobaltoc li.current.active { border-left-width: 0; margin-left: -10px; padding-left: 10px; } {% endcall %} {# {# remove highlighting from links to child pages #\} .sphinxglobaltoc li.child { {# background: {{ theme_sidebarbgcolor if theme_sidebarbgcolor != "transparent" else theme_bgcolor }};#\} border-top-left-radius: 6px; border: 1px solid {{ theme_toc_local_trim_color }}; border-width: 0 0 0 2px; } .sphinxglobaltoc li.child + li.child { border-top-left-radius: 0; } {# XXX: would like this to be li.child:not(+ li.child) #\} .sphinxglobaltoc li.child:last-child { border-bottom-left-radius: 6px; } #} {% endif %} {# use alt color for local page's links (mainly useful w/ local_bg_color #} {% if theme_toc_local_text_color %} .sphinxglobaltoc li.active a { color: {{ theme_toc_local_text_color }}; } {% endif %} {# style page sections #} div.sphinxglobaltoc ul a[href="#"] { font-style: italic; } div.sphinxglobaltoc ul a:not([href*="#"]) { font-size: 0.95em; font-style: italic; } {# link to active TOC section #} div.sphinx-toc li { position: relative; } div.sphinx-toc li:before { position: absolute; left: -0.8em; color: {{ theme_toc_current_text_color }}; } {# link to top of page #} {% if not theme_toc_local_bg_color %} div.sphinx-toc li.current.active:not(.focus):before { content: "▼"; top: 0.1em; opacity: 0.5; } {% endif %} {# link to focused section #} div.sphinx-toc li.focus.local:before { content: "▶"; opacity: 0.7; {# fix offset to account for extra padding #} {% if theme_toc_local_bg_color %} left: calc(-0.8em + 5px); {% endif %} } {# link to focused link to child page #} div.sphinx-toc > ul:not(:hover) li.focus.child:before { content: "⇒"; opacity: 0.5; font-size: 1.5em; margin-left: -4px; } {# link to focused TOC section #} div.sphinx-toc li.focus.local > a:not(:hover) { color: {{ theme_toc_current_text_color }}; } {# TOC collapsed toc lists #} div.sphinx-toc li.toc-toggle > a:after { content: "[–]"; padding-left: .25em; {{ opacity(0.5) }} } div.sphinx-toc li.toc-toggle.closed > a:after { content: "[+]"; } {% if theme_cleanup_toc | tobool %} a.reference > .objdesc { font-size: 88%; } a.reference:not(:hover) > .objdesc { {{ opacity(0.6) }} } .current ul a > .objdesc.unique { display: none; } {% endif %} {#**************************************************** # page layout - sidebar searchbox & search page #***************************************************#} div#searchbox { margin-right: 10px; /* make this match sphinxsidebarwrapper left margin */ } div#searchbox form > div { display: inline-block; margin-right: -0.4em; } div.sphinxsidebar input, h1#search-documentation ~ form input { border: 1px solid {{ theme_sidebartrimcolor }}; font-family: sans-serif; font-size: 1em; } div#searchbox input[type="submit"], h1#search-documentation ~ form > input[type="submit"] { background: {{ theme_sidebar_button_bg }}; {{ border_radius("0 5px 5px 0") }} } div#searchbox input[type="submit"]:hover, h1#search-documentation ~ form input[type="submit"]:hover, button.sidebar-toggle#sidebar-hide:hover, button.sidebar-toggle#sidebar-show:hover, .highlight .copybutton:hover { background: {{ theme_sidebar_link_hover_bg_color }}; color: {{ theme_sidebar_link_hover_text_color }}; border-color: {{ theme_sidebar_link_hover_trim_color }}; } h1#search-documentation ~ form input[type="text"]:focus, div.sphinxsidebar input[type="text"]:focus { border-color: {{ theme_sidebar_link_hover_trim_color }}; } .highlight .copybutton:hover:not(:active), div.sphinxsidebar button:hover:not(:active), div.sphinxsidebar input[type="submit"]:hover:not(:active), h1#search-documentation ~ form input[type="submit"]:hover, button.sidebar-toggle:hover:not(:active) { {{ button_box_shadow }} } button.sidebar-toggle::-moz-focus-inner, .highlight .copybutton::-moz-focus-inner { border: 0; } div.sphinxsidebar .searchtip { color: {{ theme_sidebardetailcolor }}; } #searchbox .highlight-link a[href$="hideSearchWords()"] { display: block; padding: 0 1em; font-size: 80%; text-align: right; } #searchbox .highlight-link a[href$="hideSearchWords()"]:before { content: "\00D7"; font-weight: bold; padding-right: 0.25em; } {#**************************************************** # page layout - collapsible sidebar buttons #***************************************************#} .sidebar-toggle-group { position: absolute; width: {{ theme_large_sidebar_width }}; top: 0; {{ sidebar_side }}: 0; z-index: 1; } .sidebar-toggle-group.no-js { display: none; } {% if theme_large_sidebar_width != theme_sidebarwidth %} {% call on_medium_or_small_screen() %} .sidebar-toggle-group { width: {{ theme_sidebarwidth }}; } {% endcall %} {% endif %} {% call on_print_media() %} .sidebar-toggle-group { display: none; } {% endcall %} div.document.sidebar-hidden .sidebar-toggle-group { width: auto; } div.document.document-hidden .sidebar-toggle-group { width: 100%; } button.sidebar-toggle { margin: 0; padding: 6px 12px; color: {{ theme_sidebartextcolor }}; font-size: 1em; white-space: nowrap; } button#sidebar-hide { position: absolute; {% if theme_borderless_decor | tobool %} top: {{ sidebar_top_margin }}; {{ sidebar_opp }}: 0; {% else %} top: 0; {{ sidebar_opp }}: -1px; {% endif %} background: transparent; border: 1px solid {{ theme_bodytrimcolor }}; {% if not theme_borderless_decor | tobool %} border-top-width: 0; {% elif theme_shaded_decor|tobool and not theme_rightsidebar|tobool %} border-left-width: 2px; {% endif %} border-bottom-{{ sidebar_side }}-radius: 0.7em; {% if theme_borderless_decor|tobool and theme_sidebar_top_margin %} border-top-{{ sidebar_opp }}-radius: 0.7em; {% endif %} } {% call on_small_screen() %} button#sidebar-hide { left: auto; top: 0; right: 0; background: {{ theme_bgcolor }}; border-color: {{ theme_sidebartrimcolor }}; } {% endcall %} button#sidebar-show { position: absolute; top: 0; {% if theme_borderless_decor|tobool %} {{ sidebar_side }}: 10px; {% else %} {{ sidebar_side }}: 0; {% endif %} background: {{ theme_sidebar_button_bg }}; border: 1px solid {{ theme_sidebartrimcolor }}; {% if not theme_borderless_decor | tobool %} border-top-width: 0; {% elif theme_shaded_decor|tobool and not theme_rightsidebar|tobool %} border-right-width: 2px; {% endif %} border-bottom-{{ sidebar_opp }}-radius: 0.7em; {% if theme_borderless_decor|tobool %} border-bottom-{{ sidebar_side }}-radius: 0.7em; {% endif %} } {% if theme_borderless_decor|tobool %} {% call on_medium_or_small_screen() %} button.sidebar-toggle#sidebar-show { {{ sidebar_side }}: 0; border-bottom-{{ sidebar_side }}-radius: 0; } {% endcall %} {% endif %} {#**************************************************** # page layout - footer #***************************************************#} div.footer { color: {{ theme_footertextcolor }}; width: 100%; padding: 9px 0; text-align: center; font-size: 75%; {% if theme_borderless_decor | tobool %} background: {{ theme_footerbgcolor }}; width: auto; {% if theme_shaded_decor|tobool %} {{ vert_gradient("rgba(255,255,255,0.1), rgba(255,255,255,0.0)") }} border-width: 0 2px 0 0; {% endif %} {# hack so body below footer gets correct color #} box-shadow: 0 50vh 0 50vh {{ theme_footerbgcolor }}; {% endif %} } div.footer button.link { margin: 0 -1px; padding: 0; background: none; border: none; font-size: inherit; font-family: inherit; } div.footer a, div.footer button.link { color: {{ theme_footertextcolor }}; text-decoration: underline; } div.footer a:hover, div.footer button.link:hover { color: white; } div.footer + div.footer, div.footer + script + div.footer { margin-top: -12px; } {% if theme_borderless_decor | tobool %} div.footer, div.footer a:not(:hover) { color: {{ theme_relbartextcolor }}; } {% endif %} {#=================================================== # document body - headers #==================================================#} {% set h1_size = 2.0 %} {% set h2_size = 1.875 %} {% set h3_size = 1.625 %} {% set h4_size = 1.25 %} {% set h5_size = 1.1 %} {% set h6_size = 1.0 %} {#--------------------------------------------------- # common header styling #--------------------------------------------------#} div.body h1, div.body h2, div.body p.rubric, div.body h3, div.body h4, div.body h5, div.body h6 { font-family: {{ theme_headfont }}; font-weight: normal; color: {{ theme_sectionbgcolor if theme_lighter_header_decor|tobool else theme_headtextcolor }}; clear: both; {# for floating admonitions; to take this off, have to explicitly set 'allow-float' class -- or a 'across-section' flag for admonition #} } {% call on_print_media() %} {# remove styling from headers #} div.body h1, div.body h2, div.body p.rubric, div.body h3, div.body h4, div.body h5, div.body h6 { color: {{ theme_headtextcolor }} !important; text-shadow: none !important; border: none !important; padding: 0; } {% endcall %} {#--------------------------------------------------- # h1 #--------------------------------------------------#} div.body h1 { {{ box_typography(h1_size) }} text-align: center; {% if theme_lighter_header_decor|tobool %} color: {{ theme_sectionbgcolor }}; {% endif %} } {# hack to fix toplevel header margin #} div.body > .section > h1 { {{ box_typography(h1_size, set_line=False, vert_padding=("30px",0)) }} } {# page subtitle effect #} div.body h1 + .subtitle { opacity: 0.54; font-style: italic; font-weight: bold; margin-bottom: 2.25rem; margin-top: -2.25rem; text-align: center; } {#--------------------------------------------------- # h2, h3, & rubric #--------------------------------------------------#} div.body h2, div.body p.rubric { {{ box_typography(h2_size, vert_margin=1) }} } div.body h3 { {{ box_typography(h3_size, vert_margin=0.75) }} } {#--------------------------------------------------- # solid-colored header style for h2, h3, & rubric #--------------------------------------------------#} {# h2, h3, rubric - common styling for solid-colored section #} div.body h2, div.body p.rubric, .section.emphasize-children > .section > h3, #table-of-contents > h1, {# hack for toc page #} h1#search-documentation {# hack for search page #} { {% if theme_lighter_header_decor | tobool %} {% set h2_margin = "-12px" %} padding: 0 6px; border: 1px solid {{ theme_sectionbgcolor }}; border-width: 0 0 2px 0; color: {{ theme_sectionbgcolor }}; text-shadow: 1px 1px {{ theme_sectiontrimcolor }}; {% else %} {% set h2_margin = "1px" %} padding: 6px 10px; background-color: {{ theme_sectionbgcolor }}; border: 1px solid {{ theme_sectiontrimcolor }}; border-width: 0 0 0 6px; color: {{ theme_sectiontextcolor }}; text-shadow: 1px 1px {{ theme_sectiontrimcolor }}; {% if theme_shaded_decor|tobool %} {{ vert_gradient("rgba(255,255,255,0.2), rgba(255,255,255,0)") }} {% endif %} {% endif %} {{ border_radius(theme_section_radius) }} } {% call on_small_screen() %} {# remove spacing on headers and reduce body padding #} div.body h2, div.body p.rubric, .section.emphasize-children > .section > h3 { {% if not theme_lighter_header_decor|tobool %} padding-top: 0.25em; padding-bottom: .25em; {% endif %} {{ border_radius(soft_corner_radius) }} } {% endcall %} {% if theme_shaded_decor|tobool and not theme_lighter_header_decor|tobool %} {% call on_print_media() %} div.body h2, div.body p.rubric, .section.emphasize-children > .section > h3 { border-width: 0 0 .2em 0; padding-bottom: 0.1em; } {% endcall %} {% endif %} {# h2, rubric - resize margins to account for padding & border #} div.body h2, div.body p.rubric, #table-of-contents > h1, {# hack for toc page #} h1#search-documentation {# hack for search page #} { {{ box_typography(h2_size, set_line=False, vert_margin=1, horiz_margin=h2_margin) }} } {# h3 - resize margins to account for padding & border #} .section.emphasize-children > .section > h3 { {{ box_typography(h3_size, set_line=False, vert_margin=1, horiz_margin=h2_margin) }} } {# h3, rubric - use alternate color #} div.body p.rubric, .section.emphasize-children > .section > h3 { {% if theme_lighter_header_decor|tobool %} border-color: {{ theme_rubricbgcolor }}; color: {{ theme_rubricbgcolor }}; border-width: 0 0 1px 0; {% else %} background-color: {{ theme_rubricbgcolor }}; {% if theme_rubric_trim_color|trim %} border-color: {{ theme_rubric_trim_color }} {% endif %} {% endif %} } {% if not theme_lighter_header_decor|tobool %} {# permalink styling #} div.body h2:hover a.headerlink:not(:hover), .section.emphasize-children > .section > h3:hover a.headerlink:not(:hover) { {{ opacity(0.4) }} } {# highlighted as permalink #} div.body h2.highlighted, .section.emphasize-children > .section > h3.highlighted { background-color: {{ theme_highlightcolor }}; border-color: {{ theme_link_hover_trim_color }}; color: {{ theme_headtextcolor }}; } {% endif %} {# h2, rubric -- add icon to main headers for decoration (experimental) #} {% if theme_header_icon|trim and (theme_lighter_header_decor|tobool or not theme_shaded_decor|tobool) %} div.body h2, div.body p.rubric { background-image: url("{{ theme_header_icon }}"); background-repeat: no-repeat; background-position: 10px 50%; background-size: 32px auto; padding-left: 48px; } {% endif %} {#--------------------------------------------------- # h4 etc #--------------------------------------------------#} div.body h4 { {{ box_typography(h4_size) }} clear: both; {# for floating admonitions #} } div.body h5 { {{ box_typography(h5_size) }} } div.body h6 { {{ box_typography(h6_size) }} } {#--------------------------------------------------- # fixups #--------------------------------------------------#} #table-of-contents > h1, {# hack for toc page #} h1#search-documentation {# hack for search page #} { margin-top: 0; } {# NOTE: li.page attribute set by js code #} .toctree-wrapper.highlight-pages:not(.hide-sections) li.page > a { font-weight: bold; } .toctree-wrapper.space-pages li.page { margin-top: 1em; } {# 'hide-sections' modifier is toggled by JS code for TOC page #} .toctree-wrapper.hide-sections li:not(.page) { list-style: none; margin-left: -2.5rem; } .toctree-wrapper.hide-sections li:not(.page) > a { display: none; } #hide-page-sections { float: right; opacity: 0.88; } {#--------------------------------------------------- # header permalink styling #--------------------------------------------------#} a.headerlink { color: {{ theme_headlinkcolor }}; font-size: 0.8em; margin: 0 0 0 1px; padding: 0 5px 0 4px; text-decoration: none; border: 1px solid transparent; border-width: 1px 0; {{ border_radius("0.35em") }} } div.body a.headerlink:hover { background-color: {{ theme_link_hover_bg_color }}; border-color: {{ theme_link_hover_trim_color }}; color: {{ theme_link_hover_text_color }}; text-decoration: none; {# {{button_box_shadow}} #} } a.headerlink:hover:active { {{ box_shadow("none") }} } {#--------------------------------------------------- # toggleable sections # # NOTE: .html-toggle-button class added by JS, # so we can trust that section has been instrumented. #--------------------------------------------------#} {# toggle section - common style #} .html-toggle-button { position: relative; cursor: pointer; } {# toggle section - hover style #} .html-toggle-button:hover:after, .section.emphasize-children > .section > h3.html-toggle-button:hover:after {# hack to override higher priority rule #} { background: {{ theme_link_hover_bg_color }}; {# border-color: transparent; {{ border_radius("8px") }} {{ box_shadow("0 0 0 1px " + theme_link_hover_trim_color) }}; #} border-color: {{ theme_link_hover_trim_color }}; {{ border_radius("4px") }} {{ button_box_shadow }} color: {{ theme_link_hover_text_color }}; } {# toggle button - common style #} .html-toggle-button:after { position: relative; top: -0.15em; margin: 0; padding: 0.15em 0.3em; text-shadow: none; font-size: 65%; font-style: italic; font-weight: bold; border: 1px solid transparent; } {# toggle button - content #} {# XXX: move this part to JS? #} .html-toggle.collapsed > .html-toggle-button:after { content: "[+ show section]"; } .html-toggle.expanded > .html-toggle-button:after { content: "[- hide section]"; } {# toggle button label - active style #} .html-toggle-button:active:after, .section.emphasize-children > .section > h3.html-toggle-button:active:after {# hack to override higher priority rule #} { position: relative; top: calc(-0.15em + 1px); left: 1px; } {% call on_print_media() %} {# omit "hide section" label #} .html-toggle.expanded > .html-toggle-button:after { display: none; } {# indicate collapsed sections were omitted TODO: would like to auto-expand them instead, but not sure how to create a reliable CSS rule given the way the JS code currently works. #} .html-toggle.collapsed > .html-toggle-button:after { content: "[not printed]" !important; } {% endcall %} {#**************************************************** # content styling #***************************************************#} {#------------------------------------ # block effects #------------------------------------#} .clear, .clear-both { clear: both; } .clear-left { clear: left; } .clear-right { clear: right; } .clear-none { clear: none; } div.body .clear-none > h3 { clear: none; } .hidden { display: none; } {#------------------------------------ # misc styles #------------------------------------#} div.body p { text-align: justify; {{ box_typography(1.0, set_line=False) }} } {% if theme_hyphenation_langage %} div.body p:not(.admonition-title) { {# NOTE: requires lang="xxx" on body element or parent, which our layout.html sets #} {{ experimental("hyphens", "auto") }} } {% endif %} div.body li, div.body dd { text-align: justify; } div.body hr { margin: 0 10px; background: none; border: 1px dashed {{ theme_sidebartrimcolor }}; border-width: 1px 0 0 0; } .strike { text-decoration: line-through; } {#------------------------------------ # footnotes #------------------------------------#} a.footnote-reference { font-size: 70%; position: relative; top: -.75em; } table.docutils.footnote { margin: 1em 0 0 1em; } {#------------------------------------ # lists (UL, OL, DL) #------------------------------------#} dl { margin-bottom: 1.5em; } li > dl:only-child { margin-bottom: 0; } dd { margin-right: 10px; } {# to match left indent #} dd ol { margin-bottom: 10px; } dl.docutils > dt { font-size: 1.1em; margin-bottom: .5em; } dl.docutils > dd + dt { margin-top: 1.5em; } {# join separate ULs together #} ul + ul, ul + div > ul:only-child, div.toctree-wrapper + ul { margin-top: -1em; } {# override basic.css rule #} dd ul { margin-bottom: {{ theme_bodylineheight }}; } {# add margin after ul if there's a paragraph before it, so margins are even #} li > p ~ ul.simple { margin-bottom: 1.5em; } {#**************************************************** # document - links #***************************************************#} a { color: {{ theme_linkcolor }}; text-decoration: none; } a:visited { {% if theme_visitedlinkcolor %} color: {{ theme_visitedlinkcolor }}; {% endif %} text-decoration: none; } a:hover { color: {{ theme_link_hover_text_color }}; background: {{ theme_link_hover_bg_color }}; text-decoration: underline; } a:hover:active { left: 1px; top: 1px; {{ box_shadow("0") }} } a.biglink { font-size: 130%; } {% if theme_externalrefs|tobool %} a.external:before { content: {{ theme_externalicon }}; padding-right: .1em; } a.external.issue:before { content: {{ theme_issueicon or theme_externalicon }}; } a.external[href^="mailto:"]:before { content: ""; } em.issue:before { content: {{ theme_issueicon or theme_externalicon }}; padding-right: .1em; } {% endif %} {#------------------------------------- # permalink highlighting #------------------------------------#} dt:target, .footnote:target, .highlighted { padding: 4px; margin: -4px; background-color: {{ theme_highlightcolor }}; {{ border_radius(round_corner_radius) }} } {#**************************************************** # document - table styles #***************************************************#} {#------------------------------------ # custom table classes #------------------------------------#} table.fullwidth { width: 100%; } table.centered { margin-left: auto; margin-right: auto; } table.docutils.plain { border: none; } table.docutils.plain tr.row-odd > * { background: none; } {# legacy alias for table.plain #} table.docutils.html-plain-table tr.row-odd > * { background: none; } {# fix for :align:right, doesn't work as of sphinx 2.2 #} table.docutils.align-right { margin-left: auto; } {#------------------------------------ # default table styling #------------------------------------#} {% if sphinx_version_info >= [2,0] %} table.docutils tbody { {# sphinx sets this to "middle" #} vertical-align: top; } {# sphinx adds lots of margin on P elements, which bloat tables (issue 41) #} {# XXX: may want to catch more than this... #} table.docutils th p:first-child, table.docutils td p:first-child { margin-top: 0; } table.docutils th p:last-child, table.docutils td p:last-child { margin-bottom: 0; } {% endif %} table.docutils th { border: 0 solid transparent; padding: .4em; font-family: {{ theme_headfont }}; background: {{ theme_table_header_color }}; } table.docutils th.head:not(.stub) { border-bottom: 1px solid {{ theme_table_trim_color }}; } table.docutils th.stub + td { border-left: 1px solid {{ theme_table_trim_color }}; } table.docutils td { padding: .4em; border: 0 solid {{ theme_table_trim_color }}; } table.docutils tr.row-odd td { background: {{ theme_table_shade_color }}; } h2 + table.docutils { margin-top: 1em; } table > caption { margin: 1em 0 .5em; font-style: italic; } {#------------------------------------ # td/th classes added by .ext.table_styling #------------------------------------#} {# NOTE: this is currently included automatically by table_styling extension... #} {#{% include "../../ext/static/table_styling.css" %}#} {# hide border following a TH, solid color won't show up #} table.docutils th + .single-left-divider, table.docutils th + .double-left-divider { border-left-width: 0; } {#**************************************************** # document - field-list tables & contents #***************************************************#} {% if sphinx_version_info < [2,0] %} {# add margin to field-list table, since cell margins won't collapse, but can't be relied on #} table.field-list { margin: {{ theme_bodylineheight }} 0; } {# clear stying added by table.docutils styling (above) #} table.field-list th { background: none; padding: 0 0.4em 0 0; } {# add margins between field entries, except last one #} table.field-list td { padding: 0 0 {{ theme_bodylineheight }} 0; } table.field-list tr:last-child td { padding-bottom: 0; } {# parameter definition - add margins between entries, except last one #} td.field-body > ul:first-child.simple > li { margin: 0 0 {{ theme_bodylineheight }} 0; } td.field-body > ul:first-child.simple > li:last-child { margin-bottom: 0; } {# parameter definition - add some spacing between () in type declaration #} td.field-body > em, td.field-body > ul.first.simple > li > em { padding: 2px 4px; } {# parameter definition - set margins between paragraphs, except last one #} td.field-body > p, td.field-body > ul > li > p { margin: 0 0 {{ theme_bodylineheight }}; } td.field-body > p:last-child, td.field-body > ul > li > .admonition { margin-bottom: 0; } {# docutils loves to create empty paragraphs - hide them so margin don't muck with things #} td.field-body > p:empty { display: none; } {% else %} {# parameter definition - remove margin above first paragraph in content #} dl.field-list > dd > p:first-child, dl.field-list > dd > p:first-child:empty + ul.simple li > p:first-child, dl.field-list > dd > ul:first-child.simple li > p:first-child { margin-top: 0; } {# hide annoying empty paragraphs #} dl.field-list > dd > p:first-child:empty { display: none; } {% endif %} {#**************************************************** # document - admonitions #***************************************************#} {#--------------------------------------------------- # basic admonition styling - adds bg color & icons #--------------------------------------------------#} {% set icon_size_em = "2.65em" %} div.admonition, p.deprecated { background: {{ theme_admonition_note_color }}; {{ box_typography(theme_admonition_size, vert_padding="1em") }} padding: .5em 1em; border: 1px solid {{ theme_admonition_trim_color }}; border-width: {{ theme_admonition_trim_width }}; {{ border_radius(theme_admonition_radius) }} {# make space for icon #} background-position: .6em .5em; background-size: auto 1.58em; background-repeat: no-repeat; {# set default icon #} background-image: url("icon-note.png"); } {# set icon & color for different types #} {# 'div.note' used as default style #} div.caution, div.important { background-color: {{ theme_admonition_todo_color }}; background-image: url("icon-caution.png"); } div.warning { background-color: {{ theme_admonition_warning_color }}; background-image: url("icon-warning.png"); } div.danger, div.admonition.error { background-color: {{ theme_admonition_warning_color }}; background-image: url("icon-danger.png"); } div.seealso { background-color: {{ theme_admonition_seealso_color }}; background-image: url("icon-seealso.png"); } div.admonition-todo { background-color: {{ theme_admonition_todo_color }}; background-image: url("icon-todo.png"); } p.deprecated { background-color: {{ theme_admonition_deprecated_color }}; background-image: url("icon-deprecated.png"); } {# set margins w/in admonition #} div.admonition p, div.admonition pre, div.admonition ul, div.admonition ol { {{ box_typography(theme_admonition_size, set_size=False, vert_margin=0) }} } {# ident if at toplevel #} h1 ~ div.admonition { margin-left: {{ theme_bodylineheight }}; margin-right: {{ theme_bodylineheight }}; } {#--------------------------------------------------- # 'floating' admonitions #--------------------------------------------------#} div.admonition.float-right, div.admonition.floater {# deprecated alias #} { float: right; max-width: 40%; margin: 0 0 {{ theme_bodylineheight }} {{ theme_bodylineheight }}; } .admonition.float-left { float: left; max-width: 50%; margin: 0 {{ theme_bodylineheight }} {{ theme_bodylineheight }} 0; } .admonition.float-center { clear: both; max-width: 65%; margin: 0 auto 1.5em; } {#--------------------------------------------------- # admonition header styling #--------------------------------------------------#} {% if theme_inline_admonitions == "auto" %} {% set theme_inline_admonitions = false %} {% endif %} {% if theme_inline_admonitions|tobool %} {% set inline_title_selector = "" %} {% set block_title_selector = "div.admonition.block-title" %} {% else %} {% set inline_title_selector = "div.admonition.inline-title" %} {% set block_title_selector = "" %} {% endif %} {# put admontion title in row all it's own #} {{ block_title_selector }} p.admonition-title:first-child { {% if theme_inline_admonitions|tobool %} display: block; {% endif %} margin: -.5em -1em .5em; padding: .5em .5em .5em {{ icon_size_em }}; background: {{ theme_admonition_title_color }}; {{ border_radius(soft_corner_radius + " " + soft_corner_radius + " 0 0") }} {# match admonition #} } {# fix to override basic.css's !important #} {{ block_title_selector }} p.admonition-title:first-child { margin-top: -.5em !important; } {# put admonition title inline with text #} {{ inline_title_selector }} p.admonition-title { display: inline; margin: 0; padding: 0 .25em 0 1.5em; {# make room for icon #} } {{ inline_title_selector }} p.admonition-title:after { content: ":"; } {{ inline_title_selector }} p.admonition-title + p { display: inline; } {{ inline_title_selector }} p.admonition-title + ul { margin-top: 0; } {% if not theme_inline_admonitions|tobool %} {{ inline_title_selector }} p.admonition-title { background: none; } {% endif %} {# flag to hide title #} div.admonition.without-title p.admonition-title { display: none; } div.admonition.without-title { padding-left: {{ icon_size_em }}; } {#--------------------------------------------------- # 'todo' admonition summary list #--------------------------------------------------#} div#todos p.admonition-title { font-weight: normal; color: #AAA; font-size: 70%; } div#todos div.admonition-todo + p { font-size: 70%; text-align: right; margin-top: -.5em; margin-bottom: 1.5em; color: #AAA; } div#todos div.admonition-todo + p a { font-size: 130%; } {#**************************************************** # document - verionchanged/modified/deprecated #***************************************************#} div.deprecated, div.versionchanged, div.versionadded { {{ box_typography(theme_admonition_size) }} {{ opacity("0.6") }}; } {# always contained in one of above sections #} span.versionmodified { font-weight: bold; } {#**************************************************** # document - quoted text (TT & PRE) #***************************************************#} div.highlight { background: none; margin: {{ theme_bodylineheight }} 0; } div.highlight pre, td.linenos pre { padding: 10px; font-family: {{ theme_codeblockfont }}; font-size: 85%; line-height: {{ theme_bodylineheight }}; } div.highlight pre { background-color: {{ theme_codebgcolor }}; border: 1px solid {{ theme_codetrimcolor }}; border-width: 1px 0; border-style: solid dotted dotted solid; {{ border_radius(soft_corner_radius) }} color: {{ theme_codetextcolor }}; } {# remove extra margin from consecutive .highlight-xxx + .highlight-yyy sections #} div[class|="highlight"] + div[class|="highlight"] { margin-top: -{{ bl_height }}em; } {# for source-view pages #} p + [class|=highlight] > table.highlighttable { margin-top: -1em; {# hack fixing extra padding being inserted somewhere in table td #} margin-bottom: -1em; } {# for code blocks w/ linenos added #} table.highlighttable { display: block; } table.highlighttable tbody { display: block; } table.highlighttable tr { display: flex; align-items: flex-start; justify-content: flex-start; } table.highlighttable td { display: block; padding: 0; } table.highlighttable td.code { width: 100%; max-width: calc(100% - 1em); } table.highlighttable div.linenodiv { margin-top: 2.2em; } table.highlighttable div.linenodiv pre { background: none; border: 0; margin: 0; padding: 0; padding-right: .5em; } {# NOTE:: sphinx 1.3 switch to 'code' instead of 'tt' for literals #} {% if sphinx_version_info < [1,3] %} {% set code = "tt" %} {% else %} {% set code = "code" %} {% endif %} {{ code }} { font-family: {{ theme_codeblockfont }}; font-size: 90%; } {{ code }}.literal { background-color: {{ theme_quotebgcolor }}; border: 1px solid {{ theme_quotetrimcolor }}; padding: 0px 4px; margin: 1px; {{ border_radius("4px") }} } p {{ code }}.literal { white-space: nowrap; } {{ code }}.samp.literal > em { font-family: {{ theme_codevarfont or theme_codeblockfont }}; padding: 0 1px; {{ opacity(0.6) }} } {{ code }}.samp.literal > em:before { content: "{"; } {{ code }}.samp.literal > em:after { content: "}"; } h1 {{ code }}.literal { {# background-color: inherit; border: 0; #} font-size: 80%; } h1 {{ code }}.samp.literal > em { font-weight: normal; } div.sphinxsidebar {{ code }}.literal, a.reference {{ code }}.literal, div.related a {{ code }}.literal, {{ code }}.literal.xref { background-color: transparent; border: none; padding: 0; margin: 0; } .viewcode-back { font-family: {{ theme_bodyfont }}; } div.viewcode-block:target { background-color: #f4debf; border-top: 1px solid #ac9; border-bottom: 1px solid #ac9; } {# code block 'copybutton' #} .highlight .copybutton { position: absolute; right: 0; top: 0; margin: 0; padding: 0 6px; background: transparent; border: 1px solid transparent; {{ border_radius(soft_corner_radius) }} font-size: 75%; color: {{ theme_sidebartextcolor }}; white-space: nowrap; cursor: pointer; } .highlight .copybutton.active { text-decoration: line-through; {{ opacity(0.8) }} } .highlight:not(:hover) .copybutton:not(.active) { {{ opacity(0.7) }} } {#**************************************************** # document - object description sections # requires css classes to set by .ext.autodoc_sections # # NOTE: all sections nested w/in an object description will have the form: #