| 1 |
/***************************************************** |
| 2 |
* cloud.css_t |
| 3 |
* ~~~~~~~~~~~ |
| 4 |
* |
| 5 |
* stylesheet for "Cloud" theme for Sphinx. |
| 6 |
* |
| 7 |
* :copyright: Copyright 2011-2012 by Assurance Technologies |
| 8 |
* :license: BSD |
| 9 |
* |
| 10 |
*****************************************************/ |
| 11 |
|
| 12 |
@import url("basic.css"); |
| 13 |
|
| 14 |
{#********************************************** |
| 15 |
# helper for accumulating warnings, which we hack into document via css. |
| 16 |
# submitting sphinx issue (https://github.com/sphinx-doc/sphinx/issues/2157) |
| 17 |
# in hopes of having a better way to warn user in the future. |
| 18 |
#**********************************************#} |
| 19 |
{% set _warnings = [] %} |
| 20 |
{% macro css_warning(message) %} |
| 21 |
{% set _ = _warnings.append(message) %} |
| 22 |
{% endmacro %} |
| 23 |
|
| 24 |
{% macro render_css_warnings() %} |
| 25 |
{% if _warnings %} |
| 26 |
{% set text = "cloud_sptheme errors:\n\u00B7 " + "\n\u00B7 ".join(_warnings) %} |
| 27 |
body:before { |
| 28 |
content: " |
| 29 |
{{ text.replace('\\', '\\\\').replace('\n', '\\000A').replace('"', '\\"') }} |
| 30 |
"; |
| 31 |
|
| 32 |
position: absolute; |
| 33 |
left: 0; |
| 34 |
right: 0; |
| 35 |
top: 0; |
| 36 |
z-index: 1000; |
| 37 |
|
| 38 |
display: block; |
| 39 |
padding: 1em; |
| 40 |
|
| 41 |
background: black; |
| 42 |
border: 2px solid red; |
| 43 |
|
| 44 |
font-size: 1.5em; |
| 45 |
line-height: 1.5; |
| 46 |
color: red; |
| 47 |
white-space: pre-wrap; |
| 48 |
} |
| 49 |
{% endif %} |
| 50 |
{% endmacro %} |
| 51 |
|
| 52 |
{#********************************************** |
| 53 |
# variable init |
| 54 |
#**********************************************#} |
| 55 |
|
| 56 |
{# legacy aliases #} |
| 57 |
{% if theme_lighter_decor|trim %} |
| 58 |
{% set theme_lighter_header_decor = theme_lighter_decor %} |
| 59 |
{% endif %} |
| 60 |
|
| 61 |
{% if theme_beveled_decor|trim %} |
| 62 |
{% set theme_shaded_decor = theme_beveled_decor %} |
| 63 |
{% endif %} |
| 64 |
|
| 65 |
{% if theme_sidebar_button_bg_hover|trim %} |
| 66 |
{% set theme_sidebar_link_hover_bg_color = theme_sidebar_button_bg_hover %} |
| 67 |
{% endif %} |
| 68 |
|
| 69 |
{% if theme_relbar_link_bg|trim %} |
| 70 |
{% set theme_relbar_link_bg_color = theme_relbar_link_bg %} |
| 71 |
{% endif %} |
| 72 |
|
| 73 |
{# default values #} |
| 74 |
{% if not theme_sidebar_link_hover_text_color|trim %} |
| 75 |
{% set theme_sidebar_link_hover_text_color = theme_link_hover_text_color %} |
| 76 |
{% endif %} |
| 77 |
|
| 78 |
{% if not theme_sidebar_link_hover_bg_color|trim %} |
| 79 |
{% set theme_sidebar_link_hover_bg_color = theme_link_hover_bg_color %} |
| 80 |
{% endif %} |
| 81 |
|
| 82 |
{% if not theme_sidebar_link_hover_trim_color|trim %} |
| 83 |
{% set theme_sidebar_link_hover_trim_color = theme_link_hover_trim_color %} |
| 84 |
{% endif %} |
| 85 |
|
| 86 |
{% if not theme_large_sidebar_width|trim %} |
| 87 |
{% set theme_large_sidebar_width = theme_sidebarwidth %} |
| 88 |
{% endif %} |
| 89 |
|
| 90 |
{# NOTE: could make the following configurable via theme, just trying not |
| 91 |
to multiply the number of configuration vars until needed :) #} |
| 92 |
|
| 93 |
{% set theme_relbar_link_hover_text_color = theme_sidebar_link_hover_text_color %} |
| 94 |
{# NOTE: theme_relbar_link_bg_hover is depcrecated... #} |
| 95 |
{% set theme_relbar_link_hover_bg_color = (theme_relbar_link_bg_hover|trim) or theme_sidebar_link_hover_bg_color %} |
| 96 |
{% set theme_relbar_link_hover_trim_color = theme_sidebar_link_hover_trim_color %} |
| 97 |
|
| 98 |
{% set theme_toc_hover_text_color = theme_sidebar_link_hover_text_color %} |
| 99 |
{% set theme_toc_hover_bg_color = theme_sidebar_link_hover_bg_color %} |
| 100 |
{% set theme_toc_hover_trim_color = theme_sidebar_link_hover_trim_color %} |
| 101 |
|
| 102 |
{% if not theme_headlinkcolor|trim %} |
| 103 |
{% set theme_headlinkcolor = theme_linkcolor %} |
| 104 |
{% endif %} |
| 105 |
|
| 106 |
{% if not theme_headtrimcolor|trim %} |
| 107 |
{% set theme_headtrimcolor = theme_headtextcolor %} |
| 108 |
{% endif %} |
| 109 |
|
| 110 |
{% if not theme_sectionbgcolor|trim %} |
| 111 |
{% set theme_sectionbgcolor = theme_headtrimcolor %} |
| 112 |
{% endif %} |
| 113 |
|
| 114 |
{% if not theme_rubricbgcolor|trim %} |
| 115 |
{% set theme_rubricbgcolor = theme_sectionbgcolor %} |
| 116 |
{% endif %} |
| 117 |
|
| 118 |
{% set default_toc_local_text_color = "" %} |
| 119 |
{% set default_toc_local_trim_color = theme_toc_hover_trim_color %} |
| 120 |
|
| 121 |
{% if theme_toc_local_bg_color|trim == "section" %} |
| 122 |
{% set theme_toc_local_bg_color = theme_sectionbgcolor %} |
| 123 |
{% if theme_sectiontextcolor == "inherit" %} |
| 124 |
{% set default_toc_local_text_color = theme_textcolor %} |
| 125 |
{% else %} |
| 126 |
{% set default_toc_local_text_color = theme_sectiontextcolor %} |
| 127 |
{% endif %} |
| 128 |
{% set default_toc_local_trim_color = theme_sectiontrimcolor %} |
| 129 |
{% elif theme_toc_local_bg_color|trim == "default" %} |
| 130 |
{% set theme_toc_local_bg_color = "" %} |
| 131 |
{% endif %} |
| 132 |
|
| 133 |
{% if theme_toc_local_text_color|trim == "default" %} |
| 134 |
{% set theme_toc_local_text_color = default_toc_local_text_color %} |
| 135 |
{% endif %} |
| 136 |
|
| 137 |
{% if theme_toc_local_trim_color|trim == "default" %} |
| 138 |
{% set theme_toc_local_trim_color = default_toc_local_trim_color %} |
| 139 |
{% endif %} |
| 140 |
|
| 141 |
{% if theme_toc_current_text_color|trim == "default" %} |
| 142 |
{% set theme_toc_current_text_color = theme_toc_hover_text_color %} |
| 143 |
{% endif %} |
| 144 |
|
| 145 |
{# helper based on location of sidebar #} |
| 146 |
{% if theme_rightsidebar | tobool %} |
| 147 |
{% set sidebar_side = "right" %} |
| 148 |
{% set sidebar_opp = "left" %} |
| 149 |
{% else %} |
| 150 |
{% set sidebar_side = "left" %} |
| 151 |
{% set sidebar_opp = "right" %} |
| 152 |
{% endif %} |
| 153 |
|
| 154 |
{#********************************************** |
| 155 |
# helper macros for accumulating media-specific rules |
| 156 |
# from throughout the code, and then rendering them under one location at end. |
| 157 |
#**********************************************#} |
| 158 |
{% set _media_rules = {} %} |
| 159 |
|
| 160 |
{% macro on_media(section, content=None) %} |
| 161 |
{% if content is none %}{% set content = caller() %}{% endif %} |
| 162 |
{% set _ = _media_rules.setdefault(section, []).append(content) %} |
| 163 |
{% endmacro %} |
| 164 |
|
| 165 |
{% macro on_xlarge_screen() %} |
| 166 |
{{ on_media("xlarge_screen", caller()) }} |
| 167 |
{% endmacro %} |
| 168 |
|
| 169 |
{% macro on_large_screen() %} |
| 170 |
{{ on_media("large_screen", caller()) }} |
| 171 |
{% endmacro %} |
| 172 |
|
| 173 |
{% macro on_medium_or_small_screen() %} |
| 174 |
{{ on_media("medium_or_small_screen", caller()) }} |
| 175 |
{% endmacro %} |
| 176 |
|
| 177 |
{% macro on_medium_up_screen() %} |
| 178 |
{{ on_media("medium_up_screen", caller()) }} |
| 179 |
{% endmacro %} |
| 180 |
|
| 181 |
{% macro on_small_screen() %} |
| 182 |
{{ on_media("small_screen", caller()) }} |
| 183 |
{% endmacro %} |
| 184 |
|
| 185 |
{% macro on_print_media() %} |
| 186 |
{{ on_media("print", caller()) }} |
| 187 |
{% endmacro %} |
| 188 |
|
| 189 |
{% macro render_media_rules(section) %} |
| 190 |
{{ "\n".join(_media_rules.get(section, [])) }} |
| 191 |
{% endmacro %} |
| 192 |
|
| 193 |
{#********************************************** |
| 194 |
# helper macros for rendering semi-standard css3 keywords, |
| 195 |
# e.g. border-radius |
| 196 |
#**********************************************#} |
| 197 |
|
| 198 |
{# helper to convert various font sizes to float EM value #} |
| 199 |
{%- macro size_to_em(value, rem_per_em=1) %} |
| 200 |
{% if value is string %} |
| 201 |
{% set value = value|trim %} |
| 202 |
{% if value|float(-999) != -999 %} |
| 203 |
{{ value }} |
| 204 |
{% elif value.endswith("px") %} |
| 205 |
{{ value[:-2]|float / (px_per_rem * rem_per_em) }} |
| 206 |
{% elif value.endswith("em") %} |
| 207 |
{{ value[:-2] }} |
| 208 |
{% elif value.endswith("%") %} |
| 209 |
{{ value[:-1]|float / 100 }} |
| 210 |
{% else %} |
| 211 |
{# XXX: could add 'param' keyword to provide context #} |
| 212 |
{{ css_warning("cloud.css_t: can't parse float value: %r"|format(value)) }} |
| 213 |
{% endif %} |
| 214 |
{% else %} |
| 215 |
{{ value }} |
| 216 |
{% endif %} |
| 217 |
{%- endmacro %} |
| 218 |
|
| 219 |
{% set px_per_rem = 16 %} |
| 220 |
{% set text_size_em = size_to_em(theme_default_layout_text_size)|float %} |
| 221 |
{% if not text_size_em %} {# detect issue 23 #} |
| 222 |
{{ css_warning("theme.conf: invalid/null default_layout_text_size: %r"|format(theme_default_layout_text_size)) }} |
| 223 |
{% set text_size_em = 1 %} |
| 224 |
{% endif %} |
| 225 |
{% set px_per_rem = px_per_rem * text_size_em %} |
| 226 |
|
| 227 |
{% set bl_height = size_to_em(theme_bodylineheight)|float -%} |
| 228 |
{# base line height, in rems #} |
| 229 |
|
| 230 |
{# hacked attempt to autocalculate margins & line size for various headers, etc #} |
| 231 |
{%- macro box_typography(font_height, vert_margin=2, align=0.5, |
| 232 |
set_line=True, set_size=True, |
| 233 |
horiz_margin=0, vert_padding=0, border_padding=0) -%} |
| 234 |
|
| 235 |
{%- set font_height = size_to_em(font_height)|float -%} |
| 236 |
{# header font size, in rems #} |
| 237 |
{% if vert_padding is string or vert_padding is not sequence %} |
| 238 |
{% set vert_padding = [vert_padding, vert_padding] %} |
| 239 |
{% endif %} |
| 240 |
{%- set top_padding, bottom_padding = vert_padding %} |
| 241 |
{%- set top_padding = size_to_em(top_padding, rem_per_em=font_height)|float + |
| 242 |
size_to_em(border_padding, rem_per_em=font_height)|float /2 -%} |
| 243 |
{# externally controlled header padding, in header ems #} |
| 244 |
{%- set bottom_padding = size_to_em(bottom_padding, rem_per_em=font_height)|float + |
| 245 |
size_to_em(border_padding, rem_per_em=font_height)|float /2 -%} |
| 246 |
{# externally controlled header padding, in header ems #} |
| 247 |
{% if horiz_margin is string or not horiz_margin is sequence %} |
| 248 |
{% set horiz_margin = [horiz_margin, horiz_margin] %} |
| 249 |
{% endif %} |
| 250 |
|
| 251 |
{%- set hl_height = (font_height / bl_height)|round(0, "ceil") * bl_height / font_height -%} |
| 252 |
|
| 253 |
{# debug helper -- |
| 254 |
content: "hl_height {{ hl_height }}; padding {{ vert_padding }}; vert_margin {{ vert_margin }}"; |
| 255 |
#} |
| 256 |
|
| 257 |
{%- if set_line and set_size -%} |
| 258 |
font-size: {{ font_height }}em; |
| 259 |
{% endif -%} |
| 260 |
|
| 261 |
{%- if set_line -%} |
| 262 |
line-height: {{ hl_height }}em; |
| 263 |
{% endif -%} |
| 264 |
|
| 265 |
margin: {{ (hl_height * vert_margin * align - top_padding)|round(3) }}em |
| 266 |
{{ horiz_margin[0] }} |
| 267 |
{{ (hl_height * vert_margin * (1-align) - bottom_padding)|round(3) }}em |
| 268 |
{{ horiz_margin[1] }}; |
| 269 |
{% endmacro -%} |
| 270 |
|
| 271 |
{# macro for rendering rule with vendor-specific prefix #} |
| 272 |
{% macro experimental(keyword, value) %} |
| 273 |
{% if value %} |
| 274 |
-moz-{{ keyword }}: {{ value }}; |
| 275 |
-webkit-{{ keyword }}: {{ value }}; |
| 276 |
-o-{{ keyword }}: {{ value }}; |
| 277 |
-ms-{{ keyword }}: {{ value }}; |
| 278 |
{{ keyword }}: {{ value }}; |
| 279 |
{% endif %} |
| 280 |
{% endmacro %} |
| 281 |
|
| 282 |
{% macro border_radius(value) -%} |
| 283 |
{{ experimental("border-radius", value) }} |
| 284 |
{% endmacro %} |
| 285 |
|
| 286 |
{% macro box_shadow(value) -%} |
| 287 |
{{ experimental("box-shadow", value) }} |
| 288 |
{% endmacro %} |
| 289 |
|
| 290 |
{% macro box_sizing(value) -%} |
| 291 |
{{ experimental("box-sizing", value) }} |
| 292 |
{% endmacro %} |
| 293 |
|
| 294 |
{% macro opacity(value) -%} |
| 295 |
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity= |
| 296 |
{{ (value|float*100)|round|int }}); |
| 297 |
opacity: {{ value }}; |
| 298 |
{% endmacro %} |
| 299 |
|
| 300 |
{% macro vert_gradient(stops) %} |
| 301 |
background-image: -moz-linear-gradient({{ stops }}); |
| 302 |
background-image: -webkit-linear-gradient({{ stops }}); |
| 303 |
background-image: linear-gradient({{ stops }}); |
| 304 |
{% endmacro %} |
| 305 |
|
| 306 |
{% macro horiz_gradient(stops) %} |
| 307 |
background-image: -moz-linear-gradient(left, {{ stops }}); |
| 308 |
background-image: -webkit-linear-gradient(left, {{ stops }}); |
| 309 |
background-image: linear-gradient(left, {{ stops }}); |
| 310 |
background-image: linear-gradient(to right, {{ stops }}); |
| 311 |
{% endmacro %} |
| 312 |
|
| 313 |
{% set button_box_shadow = box_shadow("1px 1px 2px -1px rgba(0,0,0,0.5)") %} |
| 314 |
|
| 315 |
{% set soft_corner_radius = "3px" %} |
| 316 |
{% set round_corner_radius = "10px" %} |
| 317 |
|
| 318 |
{# hack to parse sphinx version info into tuple |
| 319 |
could probably do this by registering filter, but wanted to try :) |
| 320 |
#} |
| 321 |
{% set sphinx_version_info = [] %} |
| 322 |
{% set state = dict(buf="", end=false) %} |
| 323 |
{% for char in (sphinx_version + ".") %} |
| 324 |
{% if state['end'] %} |
| 325 |
{% elif char.isdigit() %} |
| 326 |
{% set _ = state.update(buf=state['buf'] + char) %} |
| 327 |
{% else %} |
| 328 |
{% if state['buf'] %} |
| 329 |
{% set _ = sphinx_version_info.append(state['buf']|int) %} |
| 330 |
{% set _ = state.update(buf="") %} |
| 331 |
{% endif %} |
| 332 |
{% if char != "." %} |
| 333 |
{% set _ = state.update(end=true) %} |
| 334 |
{% endif %} |
| 335 |
{% endif %} |
| 336 |
{% endfor %} |
| 337 |
|
| 338 |
{#**************************************************** |
| 339 |
# page layout - body |
| 340 |
#***************************************************#} |
| 341 |
|
| 342 |
{% set body_margin = "1em" %} |
| 343 |
|
| 344 |
* { |
| 345 |
box-sizing: border-box; |
| 346 |
-moz-box-sizing: border-box; |
| 347 |
-webkit-box-sizing: border-box; |
| 348 |
} |
| 349 |
|
| 350 |
body |
| 351 |
{ |
| 352 |
padding: 0; |
| 353 |
color: #000; |
| 354 |
font-family: {{ theme_bodyfont }}; |
| 355 |
font-size: {{ theme_default_layout_text_size }}; |
| 356 |
line-height: {{ theme_bodylineheight }}; |
| 357 |
|
| 358 |
{% if theme_borderless_decor | tobool %} |
| 359 |
margin: 0; |
| 360 |
background: {{ theme_bgcolor }}; |
| 361 |
{% else %} |
| 362 |
margin: {{ body_margin }} {{ body_margin }} 0; |
| 363 |
background: {{ theme_footerbgcolor }}; |
| 364 |
background-attachment: fixed; |
| 365 |
{% endif %} |
| 366 |
} |
| 367 |
|
| 368 |
{% if theme_minimal_layout_text_size %} |
| 369 |
{% call on_small_screen() %} |
| 370 |
body { |
| 371 |
font-size: {{ theme_minimal_layout_text_size }}; |
| 372 |
} |
| 373 |
{% endcall %} |
| 374 |
{% endif %} |
| 375 |
|
| 376 |
{% if not theme_borderless_decor | tobool %} |
| 377 |
{% call on_medium_or_small_screen() %} |
| 378 |
body |
| 379 |
{ |
| 380 |
margin: 0; |
| 381 |
} |
| 382 |
{% endcall %} |
| 383 |
{% endif %} |
| 384 |
|
| 385 |
{% if theme_large_layout_text_size %} |
| 386 |
{% call on_xlarge_screen() %} |
| 387 |
body { |
| 388 |
font-size: {{ theme_large_layout_text_size }}; |
| 389 |
} |
| 390 |
{% endcall %} |
| 391 |
{% endif %} |
| 392 |
|
| 393 |
{#**************************************************** |
| 394 |
# page layout - relbars (top & bottom) |
| 395 |
#***************************************************#} |
| 396 |
|
| 397 |
{% if theme_borderless_decor | tobool %} |
| 398 |
div.relbar-top, div.relbar-bottom |
| 399 |
{ |
| 400 |
background: {{ theme_relbarbgcolor }}; |
| 401 |
padding: 0 {{ body_margin }}; |
| 402 |
} |
| 403 |
|
| 404 |
{% call on_medium_or_small_screen() %} |
| 405 |
div.relbar-top, div.relbar-bottom |
| 406 |
{ |
| 407 |
padding: 0; |
| 408 |
} |
| 409 |
{% endcall %} |
| 410 |
|
| 411 |
{% endif %} |
| 412 |
|
| 413 |
div.related |
| 414 |
{ |
| 415 |
margin: 0 auto; |
| 416 |
max-width: {{ theme_max_width }}; |
| 417 |
background: {{ theme_relbarbgcolor }}; |
| 418 |
line-height: {{ theme_bodylineheight }}; |
| 419 |
padding: .75em 0; |
| 420 |
color: {{ theme_relbartextcolor }}; |
| 421 |
text-shadow: 1px 1px 1px rgba(0,0,0,.3); |
| 422 |
|
| 423 |
{% if theme_borderless_decor | tobool %} |
| 424 |
background: none; |
| 425 |
{% endif %} |
| 426 |
|
| 427 |
{% if theme_shaded_decor|tobool %} |
| 428 |
{{ vert_gradient("rgba(255,255,255,.2), rgba(255,255,255,0)") }} |
| 429 |
border-width: 0 2px 3px 1px; |
| 430 |
{% endif %} |
| 431 |
} |
| 432 |
|
| 433 |
div.relbar-top div.related |
| 434 |
{ |
| 435 |
{{ border_radius(".7em .7em 0 0") }} |
| 436 |
} |
| 437 |
|
| 438 |
div.relbar-bottom div.related |
| 439 |
{ |
| 440 |
{{ border_radius("0 0 .7em .7em") }} |
| 441 |
|
| 442 |
{% if theme_shaded_decor|tobool %} |
| 443 |
{{ vert_gradient("rgba(255,255,255,.2), rgba(255,255,255,0.1)") }} |
| 444 |
border-width: 1px 2px 0 1px; |
| 445 |
{% endif %} |
| 446 |
} |
| 447 |
|
| 448 |
{# remove margin & rounded corners on small/medium screens #} |
| 449 |
{% if not theme_borderless_decor | tobool %} |
| 450 |
{% call on_medium_or_small_screen() %} |
| 451 |
div.relbar-top div.related, |
| 452 |
div.relbar-bottom div.related |
| 453 |
{ |
| 454 |
{{ border_radius("0") }} |
| 455 |
} |
| 456 |
{% endcall %} |
| 457 |
{% endif %} |
| 458 |
|
| 459 |
div.related a |
| 460 |
{ |
| 461 |
display: inline-block; |
| 462 |
padding: 0.3em 0.6em; |
| 463 |
{{ border_radius("0.8em") }} |
| 464 |
font-weight: bold; |
| 465 |
color: {{ theme_relbarlinkcolor }}; |
| 466 |
border: 1px solid transparent; |
| 467 |
} |
| 468 |
|
| 469 |
div.related li.right a |
| 470 |
{ |
| 471 |
background: {{ theme_relbar_link_bg_color }}; |
| 472 |
font-weight: normal; |
| 473 |
} |
| 474 |
|
| 475 |
div.related a:hover, |
| 476 |
div.related li.right a:hover |
| 477 |
{ |
| 478 |
background: {{ theme_relbar_link_hover_bg_color }}; |
| 479 |
color: {{ theme_relbar_link_hover_text_color }}; |
| 480 |
border-color: {{ theme_relbar_link_hover_trim_color }}; |
| 481 |
text-decoration: none; |
| 482 |
text-shadow: none; |
| 483 |
{{ button_box_shadow }} |
| 484 |
} |
| 485 |
|
| 486 |
{% call on_small_screen() %} |
| 487 |
{# tweak relbar - emphasize title, hide crumbs #} |
| 488 |
div.related > ul > li.right + li:not(.right) { font-weight: bold; } |
| 489 |
div.related > ul > li:not(.right) + li { display: none; } |
| 490 |
{% endcall %} |
| 491 |
|
| 492 |
|
| 493 |
{#**************************************************** |
| 494 |
# page layout - document |
| 495 |
#***************************************************#} |
| 496 |
|
| 497 |
div.document |
| 498 |
{ |
| 499 |
{# note: relative used by div.sidebar-toggle-group #} |
| 500 |
position: relative; |
| 501 |
margin: 0 auto; |
| 502 |
max-width: {{ theme_max_width }}; |
| 503 |
background: {{ theme_sidebarbgcolor }}; |
| 504 |
|
| 505 |
{% if theme_borderless_decor | tobool %} |
| 506 |
background: {{ theme_bgcolor }}; |
| 507 |
{% endif %} |
| 508 |
} |
| 509 |
|
| 510 |
{% if theme_small_sidebar_bg_color|trim %} |
| 511 |
{% call on_small_screen() %} |
| 512 |
div.document |
| 513 |
{ |
| 514 |
background: {{ theme_small_sidebar_bg_color }}; |
| 515 |
} |
| 516 |
|
| 517 |
{# for borderless mode #} |
| 518 |
div.sphinxsidebar |
| 519 |
{ |
| 520 |
background: transparent; |
| 521 |
border: 0; |
| 522 |
} |
| 523 |
{% endcall %} |
| 524 |
{% endif %} |
| 525 |
|
| 526 |
div.documentwrapper |
| 527 |
{ |
| 528 |
float: left; |
| 529 |
width: 100%; |
| 530 |
} |
| 531 |
|
| 532 |
div.bodywrapper |
| 533 |
{ |
| 534 |
{%- if theme_rightsidebar|tobool %} |
| 535 |
margin: 0 {{ theme_large_sidebar_width }} 0 0; |
| 536 |
{% else %} |
| 537 |
margin: 0 0 0 {{ theme_large_sidebar_width }}; |
| 538 |
{% endif %} |
| 539 |
} |
| 540 |
|
| 541 |
{% call on_small_screen() %} |
| 542 |
div.bodywrapper |
| 543 |
{ |
| 544 |
margin-{{ sidebar_side }}: 0; |
| 545 |
} |
| 546 |
{% endcall %} |
| 547 |
|
| 548 |
{% if theme_large_sidebar_width != theme_sidebarwidth %} |
| 549 |
{% call on_medium_or_small_screen() %} |
| 550 |
div.bodywrapper |
| 551 |
{ |
| 552 |
{%- if theme_rightsidebar|tobool %} |
| 553 |
margin: 0 {{ theme_sidebarwidth }} 0 0; |
| 554 |
{% else %} |
| 555 |
margin: 0 0 0 {{ theme_sidebarwidth }}; |
| 556 |
{% endif %} |
| 557 |
} |
| 558 |
{% endcall %} |
| 559 |
{% endif %} |
| 560 |
|
| 561 |
div.document.sidebar-hidden div.bodywrapper { |
| 562 |
margin-{{ sidebar_side }}: 0; |
| 563 |
} |
| 564 |
|
| 565 |
div.body |
| 566 |
{ |
| 567 |
min-height: {{ theme_min_height }}; |
| 568 |
{# note: this ^ is just a hack to prevent body from being shorter than sidebar #} |
| 569 |
|
| 570 |
{# line height debugging -- |
| 571 |
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAVCAYAAABsZT8HAAAAFElEQVQImWNgGIKgvLz8PwMDAwMAD3sCZXNDKtkAAAAASUVORK5CYII=") repeat scroll 0 0 transparent; |
| 572 |
#} |
| 573 |
background-color: {{ theme_bgcolor }}; |
| 574 |
border-{{ sidebar_side }}: 1px solid {{ theme_bodytrimcolor }}; |
| 575 |
{% if not theme_borderless_decor|tobool %} |
| 576 |
{% if theme_rightsidebar|tobool %} |
| 577 |
{{ box_shadow("1px 0 2px " + theme_bodytrimcolor) }} |
| 578 |
{% else %} |
| 579 |
{{ box_shadow("-1px 0 2px " + theme_bodytrimcolor) }} |
| 580 |
{% endif %} |
| 581 |
{% endif %} |
| 582 |
|
| 583 |
line-height: {{ theme_bodylineheight }}; |
| 584 |
|
| 585 |
color: {{ theme_textcolor }}; |
| 586 |
padding: 30px 20px; |
| 587 |
|
| 588 |
{% if theme_borderless_decor | tobool %} |
| 589 |
border-width: 0; |
| 590 |
{% endif %} |
| 591 |
|
| 592 |
{# override min/max width from sphinx 1.8 -- blocks our dynamic layout #} |
| 593 |
{# XXX: maybe allow the min-width:450px back in, |
| 594 |
or something similar, at least for medium-up layout? #} |
| 595 |
min-width: 0; |
| 596 |
max-width: none; |
| 597 |
} |
| 598 |
|
| 599 |
{% call on_print_media() %} |
| 600 |
div.body { |
| 601 |
border: 0; |
| 602 |
{{ box_shadow("none") }} |
| 603 |
} |
| 604 |
{% endcall %} |
| 605 |
|
| 606 |
{#**************************************************** |
| 607 |
# page layout - sidebar |
| 608 |
# |
| 609 |
# NOTE: sidebar visibility is controlled by two classes, |
| 610 |
# which are set on div.document by the JS code... |
| 611 |
# * sidebar-hidden -- hide sidebar on medium-up media |
| 612 |
# (default is to shown sidebar on medium-up media) |
| 613 |
# * document-hidden -- show sidebar and hide content on small media |
| 614 |
# (default is to hide sidebar & show content on small media) |
| 615 |
#***************************************************#} |
| 616 |
|
| 617 |
{% set sidebar_top_margin = "0" %} |
| 618 |
{% if theme_borderless_decor|tobool and theme_sidebarbgcolor != "transparent" %} |
| 619 |
{% set sidebar_top_margin = "16px" %} |
| 620 |
{% endif %} |
| 621 |
|
| 622 |
div.sphinxsidebar |
| 623 |
{ |
| 624 |
margin-top: {{ sidebar_top_margin }}; |
| 625 |
width: {{ theme_large_sidebar_width }}; |
| 626 |
|
| 627 |
{%- if theme_rightsidebar|tobool %} |
| 628 |
float: right; |
| 629 |
{%- endif %} |
| 630 |
|
| 631 |
font-size: 90%; |
| 632 |
line-height: 1.25em; |
| 633 |
|
| 634 |
{% if theme_borderless_decor|tobool %} |
| 635 |
margin-bottom: 16px; |
| 636 |
{{ box_sizing("border-box") }} |
| 637 |
background: {{ theme_sidebarbgcolor }}; |
| 638 |
border: 1px solid {{ theme_bodytrimcolor }}; |
| 639 |
{{ border_radius("0.7em") }} |
| 640 |
{{ box_shadow("1px 1px 1px " + theme_bodytrimcolor) }} |
| 641 |
|
| 642 |
{% if theme_shaded_decor|tobool %} |
| 643 |
{{ horiz_gradient("rgba(0,0,0,.05), rgba(255,255,255,.04), rgba(0,0,0,.05)") }} |
| 644 |
border-style: dotted solid solid dotted; |
| 645 |
{% endif %} |
| 646 |
{% endif %} |
| 647 |
} |
| 648 |
|
| 649 |
{% if theme_large_sidebar_width != theme_sidebarwidth %} |
| 650 |
{% call on_medium_or_small_screen() %} |
| 651 |
div.sphinxsidebar { width: {{ theme_sidebarwidth }}; } |
| 652 |
{% endcall %} |
| 653 |
{% endif %} |
| 654 |
|
| 655 |
{% call on_small_screen() %} |
| 656 |
div.document:not(.document-hidden) div.sphinxsidebar, |
| 657 |
div.document.document-hidden div.documentwrapper |
| 658 |
{ |
| 659 |
display: none; |
| 660 |
} |
| 661 |
|
| 662 |
div.document.document-hidden div.sphinxsidebar |
| 663 |
{ |
| 664 |
width: 100%; |
| 665 |
margin: 0; |
| 666 |
border: 0; |
| 667 |
border-radius: 0; |
| 668 |
} |
| 669 |
{% endcall %} |
| 670 |
|
| 671 |
div.document.sidebar-hidden div.sphinxsidebar { display: none; } |
| 672 |
|
| 673 |
div.sphinxsidebarwrapper |
| 674 |
{ |
| 675 |
padding: 1em 0 0 10px; |
| 676 |
} |
| 677 |
|
| 678 |
div.sphinxsidebar h3, |
| 679 |
div.sphinxsidebar h4 |
| 680 |
{ |
| 681 |
padding: 0; |
| 682 |
margin: 24px 16px 0 0; |
| 683 |
|
| 684 |
font-family: {{ theme_headfont }}; |
| 685 |
font-weight: normal; |
| 686 |
color: {{ theme_sidebartextcolor }}; |
| 687 |
} |
| 688 |
|
| 689 |
div.sphinxsidebar h3 { font-size: 1.4em; } |
| 690 |
div.sphinxsidebar h4 { font-size: 1.3em; } |
| 691 |
|
| 692 |
div.sphinxsidebar h3 a, |
| 693 |
div.sphinxsidebar h4 a |
| 694 |
{ |
| 695 |
color: {{ theme_sidebartextcolor }}; |
| 696 |
} |
| 697 |
|
| 698 |
div.sphinxsidebar p |
| 699 |
{ |
| 700 |
color: {{ theme_sidebartextcolor }}; |
| 701 |
} |
| 702 |
|
| 703 |
div.sphinxsidebar p.topless |
| 704 |
{ |
| 705 |
margin: 5px 10px 10px 10px; |
| 706 |
} |
| 707 |
|
| 708 |
div.sphinxsidebar ul |
| 709 |
{ |
| 710 |
margin: 10px; |
| 711 |
margin-right: 0; |
| 712 |
padding: 0; |
| 713 |
color: {{ theme_sidebartextcolor }}; |
| 714 |
} |
| 715 |
|
| 716 |
div.sphinxsidebar a |
| 717 |
{ |
| 718 |
color: {{ theme_sidebarlinkcolor }}; |
| 719 |
border: 1px solid transparent; |
| 720 |
border-width: 1px 0; |
| 721 |
} |
| 722 |
|
| 723 |
div.sphinxsidebar a:hover |
| 724 |
{ |
| 725 |
color: {{ theme_link_hover_text_color }}; |
| 726 |
background: {{ theme_link_hover_bg_color }}; |
| 727 |
border-color: {{ theme_link_hover_trim_color }}; |
| 728 |
text-decoration: none; |
| 729 |
} |
| 730 |
|
| 731 |
div.sphinxsidebar ul li a |
| 732 |
{ |
| 733 |
overflow: hidden; |
| 734 |
white-space: nowrap; |
| 735 |
} |
| 736 |
|
| 737 |
div.sphinxsidebar ul li a:hover |
| 738 |
{ |
| 739 |
{# XXX: need something so that overflow bg is on top of document. |
| 740 |
wanted inline-block, but causes height jumps. #} |
| 741 |
display: inline-table; |
| 742 |
min-width: 98%; |
| 743 |
min-width: calc(100% - 5px); |
| 744 |
{# outline: 2px solid {{theme_sidebarbgcolor}};#} |
| 745 |
} |
| 746 |
|
| 747 |
div.sphinxsidebar a:active |
| 748 |
{ |
| 749 |
color: {{ theme_sidebartextcolor }}; |
| 750 |
} |
| 751 |
|
| 752 |
div.sphinxsidebar p.logo |
| 753 |
{ |
| 754 |
margin: 1em 0 0 -10px; |
| 755 |
text-align: center; |
| 756 |
max-width: 100%; |
| 757 |
} |
| 758 |
|
| 759 |
div.sphinxsidebar p.logo a |
| 760 |
{ |
| 761 |
display: inline-block; |
| 762 |
{{ border_radius(soft_corner_radius) }} |
| 763 |
} |
| 764 |
|
| 765 |
{# fix margin if h3/h4 is at top of sidebar -- |
| 766 |
# consequence of sidebar boxes not all being wrapped in divs. |
| 767 |
#} |
| 768 |
div.sphinxsidebarwrapper > h3:first-child, |
| 769 |
div.sphinxsidebarwrapper > h4:first-child, |
| 770 |
div.sphinxsidebarwrapper > div:first-child > h3:first-child, |
| 771 |
div.sphinxsidebarwrapper > div:first-child > h4:first-child |
| 772 |
{ |
| 773 |
margin-top: .2em; |
| 774 |
} |
| 775 |
|
| 776 |
{#**************************************************** |
| 777 |
# page layout - sidebar TOC sections |
| 778 |
# |
| 779 |
# NOTE: classes not marked as "set by sphinx" are autopopulated by js code. |
| 780 |
# |
| 781 |
# UL nodes conditionally have the following classes applied: |
| 782 |
# * current -- if UL contains active page, or is toplevel of active page |
| 783 |
# [set by sphinx] |
| 784 |
# |
| 785 |
# LI nodes conditionally have the following classes applied: |
| 786 |
# * current -- set for root node down to toplevel of current page. |
| 787 |
# [set by sphinx] |
| 788 |
# * local -- if LI > A points to current page |
| 789 |
# * child -- if LI > A points to child of current page |
| 790 |
# * active -- if LI is part of current page, and this section |
| 791 |
# (or child) is marked as the .focus |
| 792 |
# * focus -- LI is currently focused section (implies .active) |
| 793 |
# * toc-toggle -- marked by JS code when TOC section will be expanded/collapsed |
| 794 |
# * closed -- used to mark toc-toggle section that's collapsed |
| 795 |
# |
| 796 |
# LIs for other pages contained w/in active page will not have .active-section |
| 797 |
#***************************************************#} |
| 798 |
|
| 799 |
{# sidebar link lists #} |
| 800 |
div.sphinxsidebar ul, |
| 801 |
div.sphinxsidebar ul ul, |
| 802 |
div.sphinxprev p.topless, |
| 803 |
div.sphinxnext p.topless |
| 804 |
{ |
| 805 |
list-style: none; |
| 806 |
margin-left: 0; |
| 807 |
} |
| 808 |
|
| 809 |
div.sphinxsidebar ul ul |
| 810 |
{ |
| 811 |
margin-left: 1.5em; |
| 812 |
} |
| 813 |
|
| 814 |
{# sidebar links #} |
| 815 |
div.sphinxsidebar ul a, |
| 816 |
div.sphinxprev a, |
| 817 |
div.sphinxnext a |
| 818 |
{ |
| 819 |
position: relative; |
| 820 |
display: block; |
| 821 |
padding: 1px 4px 3px 5px; |
| 822 |
margin: 0 5px 0 0; |
| 823 |
border: 1px solid transparent; |
| 824 |
{{ border_radius(soft_corner_radius) }} |
| 825 |
} |
| 826 |
|
| 827 |
{# hovered sidebar links #} |
| 828 |
div.sphinxsidebar ul a:hover, |
| 829 |
div.sphinxprev a:hover, |
| 830 |
div.sphinxnext a:hover |
| 831 |
{ |
| 832 |
background: {{ theme_toc_hover_bg_color }}; |
| 833 |
border-color: {{ theme_toc_hover_trim_color }}; |
| 834 |
color: {{ theme_toc_hover_text_color }}; |
| 835 |
text-decoration: none; |
| 836 |
} |
| 837 |
|
| 838 |
{# make links to other page look slightly different #} |
| 839 |
div.sphinx-toc ul a:not([href^="#"]):hover |
| 840 |
{ |
| 841 |
position: relative; |
| 842 |
overflow: visible; {# required for chome #} |
| 843 |
} |
| 844 |
|
| 845 |
div.sphinx-toc ul a:not([href^="#"]):hover:before |
| 846 |
{ |
| 847 |
content: "⇒"; |
| 848 |
position: absolute; |
| 849 |
right: 100%; |
| 850 |
font-size: 1.5em; |
| 851 |
margin-right: 4px; |
| 852 |
opacity: 0.7; |
| 853 |
} |
| 854 |
|
| 855 |
{# global toc -- current page #} |
| 856 |
{% if theme_toc_local_bg_color %} |
| 857 |
{# highlight the current page's LI box #} |
| 858 |
.sphinxglobaltoc li.current.active |
| 859 |
{ |
| 860 |
background: {{ theme_toc_local_bg_color }}; |
| 861 |
margin-left: -7px; |
| 862 |
padding: 6px 0 6px 3px; |
| 863 |
border: 1px solid |
| 864 |
{{ theme_toc_local_trim_color or theme_toc_hover_trim_color }}; |
| 865 |
border-width: 0 0 0 4px; |
| 866 |
{{ border_radius("6px") }} |
| 867 |
} |
| 868 |
|
| 869 |
{# highlight the current page title link #} |
| 870 |
.sphinxglobaltoc li.current.active > a |
| 871 |
{ |
| 872 |
font-weight: bold; |
| 873 |
} |
| 874 |
|
| 875 |
{% call on_small_screen() %} |
| 876 |
{# merge into left side #} |
| 877 |
.sphinxglobaltoc li.current.active |
| 878 |
{ |
| 879 |
border-left-width: 0; |
| 880 |
margin-left: -10px; |
| 881 |
padding-left: 10px; |
| 882 |
} |
| 883 |
{% endcall %} |
| 884 |
|
| 885 |
{# |
| 886 |
{# remove highlighting from links to child pages #\} |
| 887 |
.sphinxglobaltoc li.child { |
| 888 |
{# background: {{ theme_sidebarbgcolor if theme_sidebarbgcolor != "transparent" else theme_bgcolor }};#\} |
| 889 |
border-top-left-radius: 6px; |
| 890 |
border: 1px solid {{ theme_toc_local_trim_color }}; |
| 891 |
border-width: 0 0 0 2px; |
| 892 |
} |
| 893 |
|
| 894 |
.sphinxglobaltoc li.child + li.child |
| 895 |
{ |
| 896 |
border-top-left-radius: 0; |
| 897 |
} |
| 898 |
|
| 899 |
{# XXX: would like this to be li.child:not(+ li.child) #\} |
| 900 |
.sphinxglobaltoc li.child:last-child |
| 901 |
{ |
| 902 |
border-bottom-left-radius: 6px; |
| 903 |
} |
| 904 |
#} |
| 905 |
|
| 906 |
{% endif %} |
| 907 |
|
| 908 |
{# use alt color for local page's links (mainly useful w/ local_bg_color #} |
| 909 |
{% if theme_toc_local_text_color %} |
| 910 |
.sphinxglobaltoc li.active a { |
| 911 |
color: {{ theme_toc_local_text_color }}; |
| 912 |
} |
| 913 |
{% endif %} |
| 914 |
|
| 915 |
{# style page sections #} |
| 916 |
div.sphinxglobaltoc ul a[href="#"] |
| 917 |
{ |
| 918 |
font-style: italic; |
| 919 |
} |
| 920 |
|
| 921 |
div.sphinxglobaltoc ul a:not([href*="#"]) |
| 922 |
{ |
| 923 |
font-size: 0.95em; |
| 924 |
font-style: italic; |
| 925 |
} |
| 926 |
|
| 927 |
{# link to active TOC section #} |
| 928 |
div.sphinx-toc li |
| 929 |
{ |
| 930 |
position: relative; |
| 931 |
} |
| 932 |
|
| 933 |
div.sphinx-toc li:before |
| 934 |
{ |
| 935 |
position: absolute; |
| 936 |
left: -0.8em; |
| 937 |
color: {{ theme_toc_current_text_color }}; |
| 938 |
} |
| 939 |
|
| 940 |
{# link to top of page #} |
| 941 |
{% if not theme_toc_local_bg_color %} |
| 942 |
div.sphinx-toc li.current.active:not(.focus):before |
| 943 |
{ |
| 944 |
content: "â–¼"; |
| 945 |
top: 0.1em; |
| 946 |
opacity: 0.5; |
| 947 |
} |
| 948 |
{% endif %} |
| 949 |
|
| 950 |
{# link to focused section #} |
| 951 |
div.sphinx-toc li.focus.local:before |
| 952 |
{ |
| 953 |
content: "â–¶"; |
| 954 |
opacity: 0.7; |
| 955 |
|
| 956 |
{# fix offset to account for extra padding #} |
| 957 |
{% if theme_toc_local_bg_color %} |
| 958 |
left: calc(-0.8em + 5px); |
| 959 |
{% endif %} |
| 960 |
} |
| 961 |
|
| 962 |
{# link to focused link to child page #} |
| 963 |
div.sphinx-toc > ul:not(:hover) li.focus.child:before |
| 964 |
{ |
| 965 |
content: "⇒"; |
| 966 |
opacity: 0.5; |
| 967 |
font-size: 1.5em; |
| 968 |
margin-left: -4px; |
| 969 |
} |
| 970 |
|
| 971 |
{# link to focused TOC section #} |
| 972 |
div.sphinx-toc li.focus.local > a:not(:hover) |
| 973 |
{ |
| 974 |
color: {{ theme_toc_current_text_color }}; |
| 975 |
} |
| 976 |
|
| 977 |
{# TOC collapsed toc lists #} |
| 978 |
div.sphinx-toc li.toc-toggle > a:after |
| 979 |
{ |
| 980 |
content: "[–]"; |
| 981 |
padding-left: .25em; |
| 982 |
{{ opacity(0.5) }} |
| 983 |
} |
| 984 |
|
| 985 |
div.sphinx-toc li.toc-toggle.closed > a:after |
| 986 |
{ |
| 987 |
content: "[+]"; |
| 988 |
} |
| 989 |
|
| 990 |
{% if theme_cleanup_toc | tobool %} |
| 991 |
|
| 992 |
a.reference > .objdesc |
| 993 |
{ |
| 994 |
font-size: 88%; |
| 995 |
} |
| 996 |
|
| 997 |
a.reference:not(:hover) > .objdesc |
| 998 |
{ |
| 999 |
{{ opacity(0.6) }} |
| 1000 |
} |
| 1001 |
|
| 1002 |
.current ul a > .objdesc.unique |
| 1003 |
{ |
| 1004 |
display: none; |
| 1005 |
} |
| 1006 |
|
| 1007 |
{% endif %} |
| 1008 |
|
| 1009 |
{#**************************************************** |
| 1010 |
# page layout - sidebar searchbox & search page |
| 1011 |
#***************************************************#} |
| 1012 |
|
| 1013 |
div#searchbox { |
| 1014 |
margin-right: 10px; /* make this match sphinxsidebarwrapper left margin */ |
| 1015 |
} |
| 1016 |
|
| 1017 |
div#searchbox form > div { |
| 1018 |
display: inline-block; |
| 1019 |
margin-right: -0.4em; |
| 1020 |
} |
| 1021 |
|
| 1022 |
div.sphinxsidebar input, |
| 1023 |
h1#search-documentation ~ form input |
| 1024 |
{ |
| 1025 |
border: 1px solid {{ theme_sidebartrimcolor }}; |
| 1026 |
font-family: sans-serif; |
| 1027 |
font-size: 1em; |
| 1028 |
} |
| 1029 |
|
| 1030 |
div#searchbox input[type="submit"], |
| 1031 |
h1#search-documentation ~ form > input[type="submit"] |
| 1032 |
{ |
| 1033 |
background: {{ theme_sidebar_button_bg }}; |
| 1034 |
{{ border_radius("0 5px 5px 0") }} |
| 1035 |
} |
| 1036 |
|
| 1037 |
div#searchbox input[type="submit"]:hover, |
| 1038 |
h1#search-documentation ~ form input[type="submit"]:hover, |
| 1039 |
button.sidebar-toggle#sidebar-hide:hover, |
| 1040 |
button.sidebar-toggle#sidebar-show:hover, |
| 1041 |
.highlight .copybutton:hover |
| 1042 |
{ |
| 1043 |
background: {{ theme_sidebar_link_hover_bg_color }}; |
| 1044 |
color: {{ theme_sidebar_link_hover_text_color }}; |
| 1045 |
border-color: {{ theme_sidebar_link_hover_trim_color }}; |
| 1046 |
} |
| 1047 |
|
| 1048 |
h1#search-documentation ~ form input[type="text"]:focus, |
| 1049 |
div.sphinxsidebar input[type="text"]:focus |
| 1050 |
{ |
| 1051 |
border-color: {{ theme_sidebar_link_hover_trim_color }}; |
| 1052 |
} |
| 1053 |
|
| 1054 |
.highlight .copybutton:hover:not(:active), |
| 1055 |
div.sphinxsidebar button:hover:not(:active), |
| 1056 |
div.sphinxsidebar input[type="submit"]:hover:not(:active), |
| 1057 |
h1#search-documentation ~ form input[type="submit"]:hover, |
| 1058 |
button.sidebar-toggle:hover:not(:active) |
| 1059 |
{ |
| 1060 |
{{ button_box_shadow }} |
| 1061 |
} |
| 1062 |
|
| 1063 |
button.sidebar-toggle::-moz-focus-inner, |
| 1064 |
.highlight .copybutton::-moz-focus-inner |
| 1065 |
{ |
| 1066 |
border: 0; |
| 1067 |
} |
| 1068 |
|
| 1069 |
div.sphinxsidebar .searchtip |
| 1070 |
{ |
| 1071 |
color: {{ theme_sidebardetailcolor }}; |
| 1072 |
} |
| 1073 |
|
| 1074 |
#searchbox .highlight-link a[href$="hideSearchWords()"] |
| 1075 |
{ |
| 1076 |
display: block; |
| 1077 |
padding: 0 1em; |
| 1078 |
font-size: 80%; |
| 1079 |
text-align: right; |
| 1080 |
} |
| 1081 |
|
| 1082 |
#searchbox .highlight-link a[href$="hideSearchWords()"]:before |
| 1083 |
{ |
| 1084 |
content: "\00D7"; |
| 1085 |
font-weight: bold; |
| 1086 |
padding-right: 0.25em; |
| 1087 |
} |
| 1088 |
|
| 1089 |
{#**************************************************** |
| 1090 |
# page layout - collapsible sidebar buttons |
| 1091 |
#***************************************************#} |
| 1092 |
.sidebar-toggle-group |
| 1093 |
{ |
| 1094 |
position: absolute; |
| 1095 |
width: {{ theme_large_sidebar_width }}; |
| 1096 |
top: 0; |
| 1097 |
{{ sidebar_side }}: 0; |
| 1098 |
z-index: 1; |
| 1099 |
} |
| 1100 |
|
| 1101 |
.sidebar-toggle-group.no-js { display: none; } |
| 1102 |
|
| 1103 |
{% if theme_large_sidebar_width != theme_sidebarwidth %} |
| 1104 |
{% call on_medium_or_small_screen() %} |
| 1105 |
.sidebar-toggle-group { width: {{ theme_sidebarwidth }}; } |
| 1106 |
{% endcall %} |
| 1107 |
{% endif %} |
| 1108 |
|
| 1109 |
{% call on_print_media() %} |
| 1110 |
.sidebar-toggle-group { display: none; } |
| 1111 |
{% endcall %} |
| 1112 |
|
| 1113 |
div.document.sidebar-hidden .sidebar-toggle-group |
| 1114 |
{ |
| 1115 |
width: auto; |
| 1116 |
} |
| 1117 |
|
| 1118 |
div.document.document-hidden .sidebar-toggle-group |
| 1119 |
{ |
| 1120 |
width: 100%; |
| 1121 |
} |
| 1122 |
|
| 1123 |
button.sidebar-toggle |
| 1124 |
{ |
| 1125 |
margin: 0; |
| 1126 |
padding: 6px 12px; |
| 1127 |
|
| 1128 |
color: {{ theme_sidebartextcolor }}; |
| 1129 |
font-size: 1em; |
| 1130 |
white-space: nowrap; |
| 1131 |
} |
| 1132 |
|
| 1133 |
button#sidebar-hide |
| 1134 |
{ |
| 1135 |
position: absolute; |
| 1136 |
{% if theme_borderless_decor | tobool %} |
| 1137 |
top: {{ sidebar_top_margin }}; |
| 1138 |
{{ sidebar_opp }}: 0; |
| 1139 |
{% else %} |
| 1140 |
top: 0; |
| 1141 |
{{ sidebar_opp }}: -1px; |
| 1142 |
{% endif %} |
| 1143 |
|
| 1144 |
background: transparent; |
| 1145 |
border: 1px solid {{ theme_bodytrimcolor }}; |
| 1146 |
{% if not theme_borderless_decor | tobool %} |
| 1147 |
border-top-width: 0; |
| 1148 |
{% elif theme_shaded_decor|tobool and not theme_rightsidebar|tobool %} |
| 1149 |
border-left-width: 2px; |
| 1150 |
{% endif %} |
| 1151 |
|
| 1152 |
border-bottom-{{ sidebar_side }}-radius: 0.7em; |
| 1153 |
{% if theme_borderless_decor|tobool and theme_sidebar_top_margin %} |
| 1154 |
border-top-{{ sidebar_opp }}-radius: 0.7em; |
| 1155 |
{% endif %} |
| 1156 |
} |
| 1157 |
|
| 1158 |
{% call on_small_screen() %} |
| 1159 |
button#sidebar-hide |
| 1160 |
{ |
| 1161 |
left: auto; |
| 1162 |
top: 0; |
| 1163 |
right: 0; |
| 1164 |
background: {{ theme_bgcolor }}; |
| 1165 |
border-color: {{ theme_sidebartrimcolor }}; |
| 1166 |
} |
| 1167 |
{% endcall %} |
| 1168 |
|
| 1169 |
button#sidebar-show |
| 1170 |
{ |
| 1171 |
position: absolute; |
| 1172 |
top: 0; |
| 1173 |
{% if theme_borderless_decor|tobool %} |
| 1174 |
{{ sidebar_side }}: 10px; |
| 1175 |
{% else %} |
| 1176 |
{{ sidebar_side }}: 0; |
| 1177 |
{% endif %} |
| 1178 |
|
| 1179 |
background: {{ theme_sidebar_button_bg }}; |
| 1180 |
border: 1px solid {{ theme_sidebartrimcolor }}; |
| 1181 |
{% if not theme_borderless_decor | tobool %} |
| 1182 |
border-top-width: 0; |
| 1183 |
{% elif theme_shaded_decor|tobool and not theme_rightsidebar|tobool %} |
| 1184 |
border-right-width: 2px; |
| 1185 |
{% endif %} |
| 1186 |
|
| 1187 |
border-bottom-{{ sidebar_opp }}-radius: 0.7em; |
| 1188 |
{% if theme_borderless_decor|tobool %} |
| 1189 |
border-bottom-{{ sidebar_side }}-radius: 0.7em; |
| 1190 |
{% endif %} |
| 1191 |
} |
| 1192 |
|
| 1193 |
{% if theme_borderless_decor|tobool %} |
| 1194 |
{% call on_medium_or_small_screen() %} |
| 1195 |
button.sidebar-toggle#sidebar-show |
| 1196 |
{ |
| 1197 |
{{ sidebar_side }}: 0; |
| 1198 |
border-bottom-{{ sidebar_side }}-radius: 0; |
| 1199 |
} |
| 1200 |
{% endcall %} |
| 1201 |
{% endif %} |
| 1202 |
|
| 1203 |
{#**************************************************** |
| 1204 |
# page layout - footer |
| 1205 |
#***************************************************#} |
| 1206 |
|
| 1207 |
div.footer |
| 1208 |
{ |
| 1209 |
color: {{ theme_footertextcolor }}; |
| 1210 |
width: 100%; |
| 1211 |
padding: 9px 0; |
| 1212 |
text-align: center; |
| 1213 |
font-size: 75%; |
| 1214 |
|
| 1215 |
{% if theme_borderless_decor | tobool %} |
| 1216 |
background: {{ theme_footerbgcolor }}; |
| 1217 |
width: auto; |
| 1218 |
{% if theme_shaded_decor|tobool %} |
| 1219 |
{{ vert_gradient("rgba(255,255,255,0.1), rgba(255,255,255,0.0)") }} |
| 1220 |
border-width: 0 2px 0 0; |
| 1221 |
{% endif %} |
| 1222 |
{# hack so body below footer gets correct color #} |
| 1223 |
box-shadow: 0 50vh 0 50vh {{ theme_footerbgcolor }}; |
| 1224 |
{% endif %} |
| 1225 |
} |
| 1226 |
|
| 1227 |
div.footer button.link |
| 1228 |
{ |
| 1229 |
margin: 0 -1px; |
| 1230 |
padding: 0; |
| 1231 |
background: none; |
| 1232 |
border: none; |
| 1233 |
font-size: inherit; |
| 1234 |
font-family: inherit; |
| 1235 |
} |
| 1236 |
|
| 1237 |
div.footer a, |
| 1238 |
div.footer button.link |
| 1239 |
{ |
| 1240 |
color: {{ theme_footertextcolor }}; |
| 1241 |
text-decoration: underline; |
| 1242 |
} |
| 1243 |
|
| 1244 |
div.footer a:hover, |
| 1245 |
div.footer button.link:hover |
| 1246 |
{ |
| 1247 |
color: white; |
| 1248 |
} |
| 1249 |
|
| 1250 |
div.footer + div.footer, |
| 1251 |
div.footer + script + div.footer |
| 1252 |
{ |
| 1253 |
margin-top: -12px; |
| 1254 |
} |
| 1255 |
|
| 1256 |
{% if theme_borderless_decor | tobool %} |
| 1257 |
div.footer, div.footer a:not(:hover) |
| 1258 |
{ |
| 1259 |
color: {{ theme_relbartextcolor }}; |
| 1260 |
} |
| 1261 |
{% endif %} |
| 1262 |
|
| 1263 |
{#=================================================== |
| 1264 |
# document body - headers |
| 1265 |
#==================================================#} |
| 1266 |
{% set h1_size = 2.0 %} |
| 1267 |
{% set h2_size = 1.875 %} |
| 1268 |
{% set h3_size = 1.625 %} |
| 1269 |
{% set h4_size = 1.25 %} |
| 1270 |
{% set h5_size = 1.1 %} |
| 1271 |
{% set h6_size = 1.0 %} |
| 1272 |
|
| 1273 |
{#--------------------------------------------------- |
| 1274 |
# common header styling |
| 1275 |
#--------------------------------------------------#} |
| 1276 |
div.body h1, |
| 1277 |
div.body h2, |
| 1278 |
div.body p.rubric, |
| 1279 |
div.body h3, |
| 1280 |
div.body h4, |
| 1281 |
div.body h5, |
| 1282 |
div.body h6 |
| 1283 |
{ |
| 1284 |
font-family: {{ theme_headfont }}; |
| 1285 |
font-weight: normal; |
| 1286 |
color: {{ theme_sectionbgcolor if theme_lighter_header_decor|tobool else theme_headtextcolor }}; |
| 1287 |
clear: both; |
| 1288 |
{# for floating admonitions; to take this off, have to explicitly set 'allow-float' class -- or a 'across-section' flag for admonition #} |
| 1289 |
} |
| 1290 |
|
| 1291 |
{% call on_print_media() %} |
| 1292 |
{# remove styling from headers #} |
| 1293 |
div.body h1, |
| 1294 |
div.body h2, |
| 1295 |
div.body p.rubric, |
| 1296 |
div.body h3, |
| 1297 |
div.body h4, |
| 1298 |
div.body h5, |
| 1299 |
div.body h6 |
| 1300 |
{ |
| 1301 |
color: {{ theme_headtextcolor }} !important; |
| 1302 |
text-shadow: none !important; |
| 1303 |
border: none !important; |
| 1304 |
padding: 0; |
| 1305 |
} |
| 1306 |
{% endcall %} |
| 1307 |
|
| 1308 |
{#--------------------------------------------------- |
| 1309 |
# h1 |
| 1310 |
#--------------------------------------------------#} |
| 1311 |
div.body h1 |
| 1312 |
{ |
| 1313 |
{{ box_typography(h1_size) }} |
| 1314 |
text-align: center; |
| 1315 |
{% if theme_lighter_header_decor|tobool %} |
| 1316 |
color: {{ theme_sectionbgcolor }}; |
| 1317 |
{% endif %} |
| 1318 |
} |
| 1319 |
|
| 1320 |
{# hack to fix toplevel header margin #} |
| 1321 |
div.body > .section > h1 |
| 1322 |
{ |
| 1323 |
{{ box_typography(h1_size, set_line=False, vert_padding=("30px",0)) }} |
| 1324 |
} |
| 1325 |
|
| 1326 |
{# page subtitle effect #} |
| 1327 |
div.body h1 + .subtitle { |
| 1328 |
opacity: 0.54; |
| 1329 |
font-style: italic; |
| 1330 |
font-weight: bold; |
| 1331 |
margin-bottom: 2.25rem; |
| 1332 |
margin-top: -2.25rem; |
| 1333 |
text-align: center; |
| 1334 |
} |
| 1335 |
|
| 1336 |
{#--------------------------------------------------- |
| 1337 |
# h2, h3, & rubric |
| 1338 |
#--------------------------------------------------#} |
| 1339 |
|
| 1340 |
div.body h2, |
| 1341 |
div.body p.rubric |
| 1342 |
{ |
| 1343 |
{{ box_typography(h2_size, vert_margin=1) }} |
| 1344 |
} |
| 1345 |
|
| 1346 |
div.body h3 |
| 1347 |
{ |
| 1348 |
{{ box_typography(h3_size, vert_margin=0.75) }} |
| 1349 |
} |
| 1350 |
|
| 1351 |
{#--------------------------------------------------- |
| 1352 |
# solid-colored header style for h2, h3, & rubric |
| 1353 |
#--------------------------------------------------#} |
| 1354 |
|
| 1355 |
{# h2, h3, rubric - common styling for solid-colored section #} |
| 1356 |
div.body h2, |
| 1357 |
div.body p.rubric, |
| 1358 |
.section.emphasize-children > .section > h3, |
| 1359 |
#table-of-contents > h1, {# hack for toc page #} |
| 1360 |
h1#search-documentation {# hack for search page #} |
| 1361 |
{ |
| 1362 |
{% if theme_lighter_header_decor | tobool %} |
| 1363 |
{% set h2_margin = "-12px" %} |
| 1364 |
padding: 0 6px; |
| 1365 |
border: 1px solid {{ theme_sectionbgcolor }}; |
| 1366 |
border-width: 0 0 2px 0; |
| 1367 |
color: {{ theme_sectionbgcolor }}; |
| 1368 |
text-shadow: 1px 1px {{ theme_sectiontrimcolor }}; |
| 1369 |
{% else %} |
| 1370 |
{% set h2_margin = "1px" %} |
| 1371 |
padding: 6px 10px; |
| 1372 |
background-color: {{ theme_sectionbgcolor }}; |
| 1373 |
border: 1px solid {{ theme_sectiontrimcolor }}; |
| 1374 |
border-width: 0 0 0 6px; |
| 1375 |
color: {{ theme_sectiontextcolor }}; |
| 1376 |
text-shadow: 1px 1px {{ theme_sectiontrimcolor }}; |
| 1377 |
|
| 1378 |
{% if theme_shaded_decor|tobool %} |
| 1379 |
{{ vert_gradient("rgba(255,255,255,0.2), rgba(255,255,255,0)") }} |
| 1380 |
{% endif %} |
| 1381 |
{% endif %} |
| 1382 |
{{ border_radius(theme_section_radius) }} |
| 1383 |
} |
| 1384 |
|
| 1385 |
{% call on_small_screen() %} |
| 1386 |
{# remove spacing on headers and reduce body padding #} |
| 1387 |
div.body h2, |
| 1388 |
div.body p.rubric, |
| 1389 |
.section.emphasize-children > .section > h3 |
| 1390 |
{ |
| 1391 |
{% if not theme_lighter_header_decor|tobool %} |
| 1392 |
padding-top: 0.25em; |
| 1393 |
padding-bottom: .25em; |
| 1394 |
{% endif %} |
| 1395 |
{{ border_radius(soft_corner_radius) }} |
| 1396 |
} |
| 1397 |
{% endcall %} |
| 1398 |
|
| 1399 |
{% if theme_shaded_decor|tobool and not theme_lighter_header_decor|tobool %} |
| 1400 |
{% call on_print_media() %} |
| 1401 |
div.body h2, |
| 1402 |
div.body p.rubric, |
| 1403 |
.section.emphasize-children > .section > h3 |
| 1404 |
{ |
| 1405 |
border-width: 0 0 .2em 0; |
| 1406 |
padding-bottom: 0.1em; |
| 1407 |
} |
| 1408 |
{% endcall %} |
| 1409 |
{% endif %} |
| 1410 |
|
| 1411 |
{# h2, rubric - resize margins to account for padding & border #} |
| 1412 |
div.body h2, |
| 1413 |
div.body p.rubric, |
| 1414 |
#table-of-contents > h1, {# hack for toc page #} |
| 1415 |
h1#search-documentation {# hack for search page #} |
| 1416 |
{ |
| 1417 |
{{ box_typography(h2_size, set_line=False, vert_margin=1, horiz_margin=h2_margin) }} |
| 1418 |
} |
| 1419 |
|
| 1420 |
{# h3 - resize margins to account for padding & border #} |
| 1421 |
.section.emphasize-children > .section > h3 |
| 1422 |
{ |
| 1423 |
{{ box_typography(h3_size, set_line=False, vert_margin=1, horiz_margin=h2_margin) }} |
| 1424 |
} |
| 1425 |
|
| 1426 |
{# h3, rubric - use alternate color #} |
| 1427 |
div.body p.rubric, |
| 1428 |
.section.emphasize-children > .section > h3 |
| 1429 |
{ |
| 1430 |
{% if theme_lighter_header_decor|tobool %} |
| 1431 |
border-color: {{ theme_rubricbgcolor }}; |
| 1432 |
color: {{ theme_rubricbgcolor }}; |
| 1433 |
border-width: 0 0 1px 0; |
| 1434 |
{% else %} |
| 1435 |
background-color: {{ theme_rubricbgcolor }}; |
| 1436 |
{% if theme_rubric_trim_color|trim %} |
| 1437 |
border-color: {{ theme_rubric_trim_color }} |
| 1438 |
{% endif %} |
| 1439 |
{% endif %} |
| 1440 |
} |
| 1441 |
|
| 1442 |
{% if not theme_lighter_header_decor|tobool %} |
| 1443 |
|
| 1444 |
{# permalink styling #} |
| 1445 |
div.body h2:hover a.headerlink:not(:hover), |
| 1446 |
.section.emphasize-children > .section > h3:hover a.headerlink:not(:hover) |
| 1447 |
{ |
| 1448 |
{{ opacity(0.4) }} |
| 1449 |
} |
| 1450 |
|
| 1451 |
{# highlighted as permalink #} |
| 1452 |
div.body h2.highlighted, |
| 1453 |
.section.emphasize-children > .section > h3.highlighted |
| 1454 |
{ |
| 1455 |
background-color: {{ theme_highlightcolor }}; |
| 1456 |
border-color: {{ theme_link_hover_trim_color }}; |
| 1457 |
color: {{ theme_headtextcolor }}; |
| 1458 |
} |
| 1459 |
|
| 1460 |
{% endif %} |
| 1461 |
|
| 1462 |
{# h2, rubric -- add icon to main headers for decoration (experimental) #} |
| 1463 |
{% if theme_header_icon|trim and (theme_lighter_header_decor|tobool or not theme_shaded_decor|tobool) %} |
| 1464 |
div.body h2, |
| 1465 |
div.body p.rubric |
| 1466 |
{ |
| 1467 |
background-image: url("{{ theme_header_icon }}"); |
| 1468 |
background-repeat: no-repeat; |
| 1469 |
background-position: 10px 50%; |
| 1470 |
background-size: 32px auto; |
| 1471 |
padding-left: 48px; |
| 1472 |
} |
| 1473 |
{% endif %} |
| 1474 |
|
| 1475 |
{#--------------------------------------------------- |
| 1476 |
# h4 etc |
| 1477 |
#--------------------------------------------------#} |
| 1478 |
div.body h4 { |
| 1479 |
{{ box_typography(h4_size) }} |
| 1480 |
clear: both; {# for floating admonitions #} |
| 1481 |
} |
| 1482 |
div.body h5 { {{ box_typography(h5_size) }} } |
| 1483 |
div.body h6 { {{ box_typography(h6_size) }} } |
| 1484 |
|
| 1485 |
{#--------------------------------------------------- |
| 1486 |
# fixups |
| 1487 |
#--------------------------------------------------#} |
| 1488 |
#table-of-contents > h1, {# hack for toc page #} |
| 1489 |
h1#search-documentation {# hack for search page #} |
| 1490 |
{ |
| 1491 |
margin-top: 0; |
| 1492 |
} |
| 1493 |
|
| 1494 |
{# NOTE: li.page attribute set by js code #} |
| 1495 |
.toctree-wrapper.highlight-pages:not(.hide-sections) li.page > a |
| 1496 |
{ |
| 1497 |
font-weight: bold; |
| 1498 |
} |
| 1499 |
|
| 1500 |
.toctree-wrapper.space-pages li.page |
| 1501 |
{ |
| 1502 |
margin-top: 1em; |
| 1503 |
} |
| 1504 |
|
| 1505 |
{# 'hide-sections' modifier is toggled by JS code for TOC page #} |
| 1506 |
.toctree-wrapper.hide-sections li:not(.page) { |
| 1507 |
list-style: none; |
| 1508 |
margin-left: -2.5rem; |
| 1509 |
} |
| 1510 |
.toctree-wrapper.hide-sections li:not(.page) > a { display: none; } |
| 1511 |
|
| 1512 |
#hide-page-sections { float: right; opacity: 0.88; } |
| 1513 |
|
| 1514 |
{#--------------------------------------------------- |
| 1515 |
# header permalink styling |
| 1516 |
#--------------------------------------------------#} |
| 1517 |
|
| 1518 |
a.headerlink |
| 1519 |
{ |
| 1520 |
color: {{ theme_headlinkcolor }}; |
| 1521 |
font-size: 0.8em; |
| 1522 |
margin: 0 0 0 1px; |
| 1523 |
padding: 0 5px 0 4px; |
| 1524 |
text-decoration: none; |
| 1525 |
border: 1px solid transparent; |
| 1526 |
border-width: 1px 0; |
| 1527 |
{{ border_radius("0.35em") }} |
| 1528 |
} |
| 1529 |
|
| 1530 |
div.body a.headerlink:hover |
| 1531 |
{ |
| 1532 |
background-color: {{ theme_link_hover_bg_color }}; |
| 1533 |
border-color: {{ theme_link_hover_trim_color }}; |
| 1534 |
color: {{ theme_link_hover_text_color }}; |
| 1535 |
text-decoration: none; |
| 1536 |
{# {{button_box_shadow}} #} |
| 1537 |
} |
| 1538 |
|
| 1539 |
a.headerlink:hover:active |
| 1540 |
{ |
| 1541 |
{{ box_shadow("none") }} |
| 1542 |
} |
| 1543 |
|
| 1544 |
{#--------------------------------------------------- |
| 1545 |
# toggleable sections |
| 1546 |
# |
| 1547 |
# NOTE: .html-toggle-button class added by JS, |
| 1548 |
# so we can trust that section has been instrumented. |
| 1549 |
#--------------------------------------------------#} |
| 1550 |
|
| 1551 |
{# toggle section - common style #} |
| 1552 |
.html-toggle-button |
| 1553 |
{ |
| 1554 |
position: relative; |
| 1555 |
cursor: pointer; |
| 1556 |
} |
| 1557 |
|
| 1558 |
{# toggle section - hover style #} |
| 1559 |
.html-toggle-button:hover:after, |
| 1560 |
.section.emphasize-children > .section > h3.html-toggle-button:hover:after {# hack to override higher priority rule #} |
| 1561 |
{ |
| 1562 |
background: {{ theme_link_hover_bg_color }}; |
| 1563 |
{# border-color: transparent; |
| 1564 |
{{ border_radius("8px") }} |
| 1565 |
{{ box_shadow("0 0 0 1px " + theme_link_hover_trim_color) }}; #} |
| 1566 |
|
| 1567 |
border-color: {{ theme_link_hover_trim_color }}; |
| 1568 |
{{ border_radius("4px") }} |
| 1569 |
{{ button_box_shadow }} |
| 1570 |
|
| 1571 |
color: {{ theme_link_hover_text_color }}; |
| 1572 |
} |
| 1573 |
|
| 1574 |
{# toggle button - common style #} |
| 1575 |
.html-toggle-button:after |
| 1576 |
{ |
| 1577 |
position: relative; |
| 1578 |
top: -0.15em; |
| 1579 |
margin: 0; |
| 1580 |
padding: 0.15em 0.3em; |
| 1581 |
text-shadow: none; |
| 1582 |
font-size: 65%; |
| 1583 |
font-style: italic; |
| 1584 |
font-weight: bold; |
| 1585 |
border: 1px solid transparent; |
| 1586 |
} |
| 1587 |
|
| 1588 |
{# toggle button - content #} |
| 1589 |
{# XXX: move this part to JS? #} |
| 1590 |
.html-toggle.collapsed > .html-toggle-button:after { content: "[+ show section]"; } |
| 1591 |
.html-toggle.expanded > .html-toggle-button:after { content: "[- hide section]"; } |
| 1592 |
|
| 1593 |
{# toggle button label - active style #} |
| 1594 |
.html-toggle-button:active:after, |
| 1595 |
.section.emphasize-children > .section > h3.html-toggle-button:active:after |
| 1596 |
{# hack to override higher priority rule #} |
| 1597 |
{ |
| 1598 |
position: relative; |
| 1599 |
top: calc(-0.15em + 1px); |
| 1600 |
left: 1px; |
| 1601 |
} |
| 1602 |
|
| 1603 |
{% call on_print_media() %} |
| 1604 |
|
| 1605 |
{# omit "hide section" label #} |
| 1606 |
.html-toggle.expanded > .html-toggle-button:after |
| 1607 |
{ |
| 1608 |
display: none; |
| 1609 |
} |
| 1610 |
|
| 1611 |
{# indicate collapsed sections were omitted |
| 1612 |
TODO: would like to auto-expand them instead, but not sure how to |
| 1613 |
create a reliable CSS rule given the way the JS code currently works. |
| 1614 |
#} |
| 1615 |
.html-toggle.collapsed > .html-toggle-button:after |
| 1616 |
{ |
| 1617 |
content: "[not printed]" !important; |
| 1618 |
} |
| 1619 |
|
| 1620 |
{% endcall %} |
| 1621 |
|
| 1622 |
{#**************************************************** |
| 1623 |
# content styling |
| 1624 |
#***************************************************#} |
| 1625 |
|
| 1626 |
{#------------------------------------ |
| 1627 |
# block effects |
| 1628 |
#------------------------------------#} |
| 1629 |
.clear, .clear-both { clear: both; } |
| 1630 |
|
| 1631 |
.clear-left { clear: left; } |
| 1632 |
|
| 1633 |
.clear-right { clear: right; } |
| 1634 |
|
| 1635 |
.clear-none { clear: none; } |
| 1636 |
|
| 1637 |
div.body .clear-none > h3 { clear: none; } |
| 1638 |
|
| 1639 |
.hidden { display: none; } |
| 1640 |
|
| 1641 |
{#------------------------------------ |
| 1642 |
# misc styles |
| 1643 |
#------------------------------------#} |
| 1644 |
|
| 1645 |
div.body p |
| 1646 |
{ |
| 1647 |
text-align: justify; |
| 1648 |
{{ box_typography(1.0, set_line=False) }} |
| 1649 |
} |
| 1650 |
|
| 1651 |
{% if theme_hyphenation_langage %} |
| 1652 |
div.body p:not(.admonition-title) { |
| 1653 |
{# NOTE: requires lang="xxx" on body element or parent, which our layout.html sets #} |
| 1654 |
{{ experimental("hyphens", "auto") }} |
| 1655 |
} |
| 1656 |
{% endif %} |
| 1657 |
|
| 1658 |
div.body li, |
| 1659 |
div.body dd |
| 1660 |
{ |
| 1661 |
text-align: justify; |
| 1662 |
} |
| 1663 |
|
| 1664 |
div.body hr { |
| 1665 |
margin: 0 10px; |
| 1666 |
background: none; |
| 1667 |
border: 1px dashed {{ theme_sidebartrimcolor }}; |
| 1668 |
border-width: 1px 0 0 0; |
| 1669 |
} |
| 1670 |
|
| 1671 |
.strike |
| 1672 |
{ |
| 1673 |
text-decoration: line-through; |
| 1674 |
} |
| 1675 |
|
| 1676 |
{#------------------------------------ |
| 1677 |
# footnotes |
| 1678 |
#------------------------------------#} |
| 1679 |
|
| 1680 |
a.footnote-reference |
| 1681 |
{ |
| 1682 |
font-size: 70%; |
| 1683 |
position: relative; |
| 1684 |
top: -.75em; |
| 1685 |
} |
| 1686 |
|
| 1687 |
table.docutils.footnote { margin: 1em 0 0 1em; } |
| 1688 |
|
| 1689 |
{#------------------------------------ |
| 1690 |
# lists (UL, OL, DL) |
| 1691 |
#------------------------------------#} |
| 1692 |
|
| 1693 |
dl { margin-bottom: 1.5em; } |
| 1694 |
li > dl:only-child { margin-bottom: 0; } |
| 1695 |
|
| 1696 |
dd { margin-right: 10px; } {# to match left indent #} |
| 1697 |
|
| 1698 |
dd ol { margin-bottom: 10px; } |
| 1699 |
|
| 1700 |
dl.docutils > dt { font-size: 1.1em; margin-bottom: .5em; } |
| 1701 |
dl.docutils > dd + dt { margin-top: 1.5em; } |
| 1702 |
|
| 1703 |
{# join separate ULs together #} |
| 1704 |
ul + ul, |
| 1705 |
ul + div > ul:only-child, |
| 1706 |
div.toctree-wrapper + ul { margin-top: -1em; } |
| 1707 |
|
| 1708 |
{# override basic.css rule #} |
| 1709 |
dd ul { margin-bottom: {{ theme_bodylineheight }}; } |
| 1710 |
|
| 1711 |
{# add margin after ul if there's a paragraph before it, so margins are even #} |
| 1712 |
li > p ~ ul.simple { margin-bottom: 1.5em; } |
| 1713 |
|
| 1714 |
{#**************************************************** |
| 1715 |
# document - links |
| 1716 |
#***************************************************#} |
| 1717 |
|
| 1718 |
a |
| 1719 |
{ |
| 1720 |
color: {{ theme_linkcolor }}; |
| 1721 |
text-decoration: none; |
| 1722 |
} |
| 1723 |
|
| 1724 |
a:visited |
| 1725 |
{ |
| 1726 |
{% if theme_visitedlinkcolor %} |
| 1727 |
color: {{ theme_visitedlinkcolor }}; |
| 1728 |
{% endif %} |
| 1729 |
text-decoration: none; |
| 1730 |
} |
| 1731 |
|
| 1732 |
a:hover |
| 1733 |
{ |
| 1734 |
color: {{ theme_link_hover_text_color }}; |
| 1735 |
background: {{ theme_link_hover_bg_color }}; |
| 1736 |
text-decoration: underline; |
| 1737 |
} |
| 1738 |
|
| 1739 |
a:hover:active |
| 1740 |
{ |
| 1741 |
left: 1px; |
| 1742 |
top: 1px; |
| 1743 |
{{ box_shadow("0") }} |
| 1744 |
} |
| 1745 |
|
| 1746 |
a.biglink |
| 1747 |
{ |
| 1748 |
font-size: 130%; |
| 1749 |
} |
| 1750 |
|
| 1751 |
{% if theme_externalrefs|tobool %} |
| 1752 |
a.external:before |
| 1753 |
{ |
| 1754 |
content: {{ theme_externalicon }}; |
| 1755 |
padding-right: .1em; |
| 1756 |
} |
| 1757 |
|
| 1758 |
a.external.issue:before |
| 1759 |
{ |
| 1760 |
content: {{ theme_issueicon or theme_externalicon }}; |
| 1761 |
} |
| 1762 |
|
| 1763 |
a.external[href^="mailto:"]:before |
| 1764 |
{ |
| 1765 |
content: ""; |
| 1766 |
} |
| 1767 |
|
| 1768 |
em.issue:before |
| 1769 |
{ |
| 1770 |
content: {{ theme_issueicon or theme_externalicon }}; |
| 1771 |
padding-right: .1em; |
| 1772 |
} |
| 1773 |
{% endif %} |
| 1774 |
|
| 1775 |
{#------------------------------------- |
| 1776 |
# permalink highlighting |
| 1777 |
#------------------------------------#} |
| 1778 |
|
| 1779 |
dt:target, |
| 1780 |
.footnote:target, |
| 1781 |
.highlighted |
| 1782 |
{ |
| 1783 |
padding: 4px; |
| 1784 |
margin: -4px; |
| 1785 |
background-color: {{ theme_highlightcolor }}; |
| 1786 |
{{ border_radius(round_corner_radius) }} |
| 1787 |
} |
| 1788 |
|
| 1789 |
{#**************************************************** |
| 1790 |
# document - table styles |
| 1791 |
#***************************************************#} |
| 1792 |
|
| 1793 |
{#------------------------------------ |
| 1794 |
# custom table classes |
| 1795 |
#------------------------------------#} |
| 1796 |
|
| 1797 |
table.fullwidth { width: 100%; } |
| 1798 |
|
| 1799 |
table.centered { margin-left: auto; margin-right: auto; } |
| 1800 |
|
| 1801 |
table.docutils.plain { border: none; } |
| 1802 |
table.docutils.plain tr.row-odd > * { background: none; } |
| 1803 |
|
| 1804 |
{# legacy alias for table.plain #} |
| 1805 |
table.docutils.html-plain-table tr.row-odd > * { background: none; } |
| 1806 |
|
| 1807 |
{# fix for :align:right, doesn't work as of sphinx 2.2 #} |
| 1808 |
table.docutils.align-right { margin-left: auto; } |
| 1809 |
|
| 1810 |
{#------------------------------------ |
| 1811 |
# default table styling |
| 1812 |
#------------------------------------#} |
| 1813 |
|
| 1814 |
{% if sphinx_version_info >= [2,0] %} |
| 1815 |
table.docutils tbody |
| 1816 |
{ |
| 1817 |
{# sphinx sets this to "middle" #} |
| 1818 |
vertical-align: top; |
| 1819 |
} |
| 1820 |
|
| 1821 |
{# sphinx adds lots of margin on P elements, which bloat tables (issue 41) #} |
| 1822 |
{# XXX: may want to catch more than this... #} |
| 1823 |
table.docutils th p:first-child, |
| 1824 |
table.docutils td p:first-child |
| 1825 |
{ |
| 1826 |
margin-top: 0; |
| 1827 |
} |
| 1828 |
|
| 1829 |
table.docutils th p:last-child, |
| 1830 |
table.docutils td p:last-child |
| 1831 |
{ |
| 1832 |
margin-bottom: 0; |
| 1833 |
} |
| 1834 |
{% endif %} |
| 1835 |
|
| 1836 |
table.docutils th { |
| 1837 |
border: 0 solid transparent; |
| 1838 |
padding: .4em; |
| 1839 |
font-family: {{ theme_headfont }}; |
| 1840 |
background: {{ theme_table_header_color }}; |
| 1841 |
} |
| 1842 |
|
| 1843 |
table.docutils th.head:not(.stub) { |
| 1844 |
border-bottom: 1px solid {{ theme_table_trim_color }}; |
| 1845 |
} |
| 1846 |
|
| 1847 |
table.docutils th.stub + td |
| 1848 |
{ |
| 1849 |
border-left: 1px solid {{ theme_table_trim_color }}; |
| 1850 |
} |
| 1851 |
|
| 1852 |
table.docutils td { |
| 1853 |
padding: .4em; |
| 1854 |
border: 0 solid {{ theme_table_trim_color }}; |
| 1855 |
} |
| 1856 |
table.docutils tr.row-odd td { background: {{ theme_table_shade_color }}; } |
| 1857 |
|
| 1858 |
h2 + table.docutils { margin-top: 1em; } |
| 1859 |
table > caption { margin: 1em 0 .5em; font-style: italic; } |
| 1860 |
|
| 1861 |
{#------------------------------------ |
| 1862 |
# td/th classes added by .ext.table_styling |
| 1863 |
#------------------------------------#} |
| 1864 |
|
| 1865 |
{# NOTE: this is currently included automatically by table_styling extension... #} |
| 1866 |
{#{% include "../../ext/static/table_styling.css" %}#} |
| 1867 |
|
| 1868 |
{# hide border following a TH, solid color won't show up #} |
| 1869 |
table.docutils th + .single-left-divider, |
| 1870 |
table.docutils th + .double-left-divider { border-left-width: 0; } |
| 1871 |
|
| 1872 |
{#**************************************************** |
| 1873 |
# document - field-list tables & contents |
| 1874 |
#***************************************************#} |
| 1875 |
|
| 1876 |
{% if sphinx_version_info < [2,0] %} |
| 1877 |
|
| 1878 |
{# add margin to field-list table, since cell margins won't collapse, but can't be relied on #} |
| 1879 |
table.field-list { margin: {{ theme_bodylineheight }} 0; } |
| 1880 |
|
| 1881 |
{# clear stying added by table.docutils styling (above) #} |
| 1882 |
table.field-list th { background: none; padding: 0 0.4em 0 0; } |
| 1883 |
|
| 1884 |
{# add margins between field entries, except last one #} |
| 1885 |
table.field-list td { padding: 0 0 {{ theme_bodylineheight }} 0; } |
| 1886 |
table.field-list tr:last-child td { padding-bottom: 0; } |
| 1887 |
|
| 1888 |
{# parameter definition - add margins between entries, except last one #} |
| 1889 |
td.field-body > ul:first-child.simple > li { margin: 0 0 {{ theme_bodylineheight }} 0; } |
| 1890 |
td.field-body > ul:first-child.simple > li:last-child { margin-bottom: 0; } |
| 1891 |
|
| 1892 |
{# parameter definition - add some spacing between () in type declaration #} |
| 1893 |
td.field-body > em, |
| 1894 |
td.field-body > ul.first.simple > li > em { padding: 2px 4px; } |
| 1895 |
|
| 1896 |
{# parameter definition - set margins between paragraphs, except last one #} |
| 1897 |
td.field-body > p, |
| 1898 |
td.field-body > ul > li > p { margin: 0 0 {{ theme_bodylineheight }}; } |
| 1899 |
|
| 1900 |
td.field-body > p:last-child, |
| 1901 |
td.field-body > ul > li > .admonition { margin-bottom: 0; } |
| 1902 |
|
| 1903 |
{# docutils loves to create empty paragraphs - hide them so margin don't muck with things #} |
| 1904 |
td.field-body > p:empty { display: none; } |
| 1905 |
|
| 1906 |
{% else %} |
| 1907 |
|
| 1908 |
{# parameter definition - remove margin above first paragraph in content #} |
| 1909 |
dl.field-list > dd > p:first-child, |
| 1910 |
dl.field-list > dd > p:first-child:empty + ul.simple li > p:first-child, |
| 1911 |
dl.field-list > dd > ul:first-child.simple li > p:first-child |
| 1912 |
{ margin-top: 0; } |
| 1913 |
|
| 1914 |
{# hide annoying empty paragraphs #} |
| 1915 |
dl.field-list > dd > p:first-child:empty { display: none; } |
| 1916 |
|
| 1917 |
{% endif %} |
| 1918 |
|
| 1919 |
{#**************************************************** |
| 1920 |
# document - admonitions |
| 1921 |
#***************************************************#} |
| 1922 |
|
| 1923 |
{#--------------------------------------------------- |
| 1924 |
# basic admonition styling - adds bg color & icons |
| 1925 |
#--------------------------------------------------#} |
| 1926 |
{% set icon_size_em = "2.65em" %} |
| 1927 |
|
| 1928 |
div.admonition, p.deprecated |
| 1929 |
{ |
| 1930 |
background: {{ theme_admonition_note_color }}; |
| 1931 |
{{ box_typography(theme_admonition_size, vert_padding="1em") }} |
| 1932 |
padding: .5em 1em; |
| 1933 |
border: 1px solid {{ theme_admonition_trim_color }}; |
| 1934 |
border-width: {{ theme_admonition_trim_width }}; |
| 1935 |
{{ border_radius(theme_admonition_radius) }} |
| 1936 |
|
| 1937 |
{# make space for icon #} |
| 1938 |
background-position: .6em .5em; |
| 1939 |
background-size: auto 1.58em; |
| 1940 |
background-repeat: no-repeat; |
| 1941 |
|
| 1942 |
{# set default icon #} |
| 1943 |
background-image: url("icon-note.png"); |
| 1944 |
} |
| 1945 |
|
| 1946 |
{# set icon & color for different types #} |
| 1947 |
{# 'div.note' used as default style #} |
| 1948 |
div.caution, div.important { background-color: {{ theme_admonition_todo_color }}; background-image: url("icon-caution.png"); } |
| 1949 |
div.warning { background-color: {{ theme_admonition_warning_color }}; background-image: url("icon-warning.png"); } |
| 1950 |
div.danger, div.admonition.error { background-color: {{ theme_admonition_warning_color }}; background-image: url("icon-danger.png"); } |
| 1951 |
|
| 1952 |
div.seealso { background-color: {{ theme_admonition_seealso_color }}; background-image: url("icon-seealso.png"); } |
| 1953 |
div.admonition-todo { background-color: {{ theme_admonition_todo_color }}; background-image: url("icon-todo.png"); } |
| 1954 |
p.deprecated { background-color: {{ theme_admonition_deprecated_color }}; background-image: url("icon-deprecated.png"); } |
| 1955 |
|
| 1956 |
{# set margins w/in admonition #} |
| 1957 |
div.admonition p, |
| 1958 |
div.admonition pre, |
| 1959 |
div.admonition ul, |
| 1960 |
div.admonition ol { |
| 1961 |
{{ box_typography(theme_admonition_size, set_size=False, vert_margin=0) }} |
| 1962 |
} |
| 1963 |
|
| 1964 |
{# ident if at toplevel #} |
| 1965 |
h1 ~ div.admonition { margin-left: {{ theme_bodylineheight }}; margin-right: {{ theme_bodylineheight }}; } |
| 1966 |
|
| 1967 |
{#--------------------------------------------------- |
| 1968 |
# 'floating' admonitions |
| 1969 |
#--------------------------------------------------#} |
| 1970 |
div.admonition.float-right, |
| 1971 |
div.admonition.floater {# deprecated alias #} |
| 1972 |
{ |
| 1973 |
float: right; |
| 1974 |
max-width: 40%; |
| 1975 |
margin: 0 0 {{ theme_bodylineheight }} {{ theme_bodylineheight }}; |
| 1976 |
} |
| 1977 |
|
| 1978 |
.admonition.float-left |
| 1979 |
{ |
| 1980 |
float: left; |
| 1981 |
max-width: 50%; |
| 1982 |
margin: 0 {{ theme_bodylineheight }} {{ theme_bodylineheight }} 0; |
| 1983 |
} |
| 1984 |
|
| 1985 |
.admonition.float-center |
| 1986 |
{ |
| 1987 |
clear: both; |
| 1988 |
max-width: 65%; |
| 1989 |
margin: 0 auto 1.5em; |
| 1990 |
} |
| 1991 |
|
| 1992 |
{#--------------------------------------------------- |
| 1993 |
# admonition header styling |
| 1994 |
#--------------------------------------------------#} |
| 1995 |
{% if theme_inline_admonitions == "auto" %} |
| 1996 |
{% set theme_inline_admonitions = false %} |
| 1997 |
{% endif %} |
| 1998 |
|
| 1999 |
{% if theme_inline_admonitions|tobool %} |
| 2000 |
{% set inline_title_selector = "" %} |
| 2001 |
{% set block_title_selector = "div.admonition.block-title" %} |
| 2002 |
{% else %} |
| 2003 |
{% set inline_title_selector = "div.admonition.inline-title" %} |
| 2004 |
{% set block_title_selector = "" %} |
| 2005 |
{% endif %} |
| 2006 |
|
| 2007 |
{# put admontion title in row all it's own #} |
| 2008 |
{{ block_title_selector }} p.admonition-title:first-child |
| 2009 |
{ |
| 2010 |
{% if theme_inline_admonitions|tobool %} |
| 2011 |
display: block; |
| 2012 |
{% endif %} |
| 2013 |
margin: -.5em -1em .5em; |
| 2014 |
padding: .5em .5em .5em {{ icon_size_em }}; |
| 2015 |
background: {{ theme_admonition_title_color }}; |
| 2016 |
{{ border_radius(soft_corner_radius + " " + soft_corner_radius + " 0 0") }} |
| 2017 |
{# match admonition #} |
| 2018 |
} |
| 2019 |
|
| 2020 |
{# fix to override basic.css's !important #} |
| 2021 |
{{ block_title_selector }} p.admonition-title:first-child { margin-top: -.5em !important; } |
| 2022 |
|
| 2023 |
{# put admonition title inline with text #} |
| 2024 |
{{ inline_title_selector }} p.admonition-title |
| 2025 |
{ |
| 2026 |
display: inline; |
| 2027 |
margin: 0; |
| 2028 |
padding: 0 .25em 0 1.5em; {# make room for icon #} |
| 2029 |
} |
| 2030 |
|
| 2031 |
{{ inline_title_selector }} p.admonition-title:after { content: ":"; } |
| 2032 |
{{ inline_title_selector }} p.admonition-title + p { display: inline; } |
| 2033 |
{{ inline_title_selector }} p.admonition-title + ul { margin-top: 0; } |
| 2034 |
{% if not theme_inline_admonitions|tobool %} |
| 2035 |
{{ inline_title_selector }} p.admonition-title { background: none; } |
| 2036 |
{% endif %} |
| 2037 |
|
| 2038 |
{# flag to hide title #} |
| 2039 |
div.admonition.without-title p.admonition-title { |
| 2040 |
display: none; |
| 2041 |
} |
| 2042 |
|
| 2043 |
div.admonition.without-title |
| 2044 |
{ |
| 2045 |
padding-left: {{ icon_size_em }}; |
| 2046 |
} |
| 2047 |
|
| 2048 |
{#--------------------------------------------------- |
| 2049 |
# 'todo' admonition summary list |
| 2050 |
#--------------------------------------------------#} |
| 2051 |
|
| 2052 |
div#todos p.admonition-title |
| 2053 |
{ |
| 2054 |
font-weight: normal; |
| 2055 |
color: #AAA; |
| 2056 |
font-size: 70%; |
| 2057 |
} |
| 2058 |
|
| 2059 |
div#todos div.admonition-todo + p |
| 2060 |
{ |
| 2061 |
font-size: 70%; |
| 2062 |
text-align: right; |
| 2063 |
margin-top: -.5em; |
| 2064 |
margin-bottom: 1.5em; |
| 2065 |
color: #AAA; |
| 2066 |
} |
| 2067 |
|
| 2068 |
div#todos div.admonition-todo + p a |
| 2069 |
{ |
| 2070 |
font-size: 130%; |
| 2071 |
} |
| 2072 |
|
| 2073 |
{#**************************************************** |
| 2074 |
# document - verionchanged/modified/deprecated |
| 2075 |
#***************************************************#} |
| 2076 |
div.deprecated, div.versionchanged, div.versionadded |
| 2077 |
{ |
| 2078 |
{{ box_typography(theme_admonition_size) }} |
| 2079 |
{{ opacity("0.6") }}; |
| 2080 |
} |
| 2081 |
|
| 2082 |
{# always contained in one of above sections #} |
| 2083 |
span.versionmodified |
| 2084 |
{ |
| 2085 |
font-weight: bold; |
| 2086 |
} |
| 2087 |
|
| 2088 |
{#**************************************************** |
| 2089 |
# document - quoted text (TT & PRE) |
| 2090 |
#***************************************************#} |
| 2091 |
|
| 2092 |
div.highlight |
| 2093 |
{ |
| 2094 |
background: none; |
| 2095 |
margin: {{ theme_bodylineheight }} 0; |
| 2096 |
} |
| 2097 |
|
| 2098 |
div.highlight pre, |
| 2099 |
td.linenos pre |
| 2100 |
{ |
| 2101 |
padding: 10px; |
| 2102 |
|
| 2103 |
font-family: {{ theme_codeblockfont }}; |
| 2104 |
font-size: 85%; |
| 2105 |
line-height: {{ theme_bodylineheight }}; |
| 2106 |
} |
| 2107 |
|
| 2108 |
div.highlight pre |
| 2109 |
{ |
| 2110 |
background-color: {{ theme_codebgcolor }}; |
| 2111 |
|
| 2112 |
border: 1px solid {{ theme_codetrimcolor }}; |
| 2113 |
border-width: 1px 0; |
| 2114 |
border-style: solid dotted dotted solid; |
| 2115 |
{{ border_radius(soft_corner_radius) }} |
| 2116 |
color: {{ theme_codetextcolor }}; |
| 2117 |
} |
| 2118 |
|
| 2119 |
{# remove extra margin from consecutive .highlight-xxx + .highlight-yyy sections #} |
| 2120 |
div[class|="highlight"] + div[class|="highlight"] |
| 2121 |
{ |
| 2122 |
margin-top: -{{ bl_height }}em; |
| 2123 |
} |
| 2124 |
|
| 2125 |
{# for source-view pages #} |
| 2126 |
p + [class|=highlight] > table.highlighttable |
| 2127 |
{ |
| 2128 |
margin-top: -1em; |
| 2129 |
{# hack fixing extra padding being inserted somewhere in table td #} |
| 2130 |
margin-bottom: -1em; |
| 2131 |
} |
| 2132 |
|
| 2133 |
{# for code blocks w/ linenos added #} |
| 2134 |
table.highlighttable { display: block; } |
| 2135 |
table.highlighttable tbody { display: block; } |
| 2136 |
table.highlighttable tr { display: flex; align-items: flex-start; justify-content: flex-start; } |
| 2137 |
table.highlighttable td { display: block; padding: 0; } |
| 2138 |
table.highlighttable td.code { width: 100%; max-width: calc(100% - 1em); } |
| 2139 |
table.highlighttable div.linenodiv { margin-top: 2.2em; } |
| 2140 |
table.highlighttable div.linenodiv pre |
| 2141 |
{ |
| 2142 |
background: none; |
| 2143 |
border: 0; |
| 2144 |
margin: 0; |
| 2145 |
padding: 0; |
| 2146 |
padding-right: .5em; |
| 2147 |
} |
| 2148 |
|
| 2149 |
{# NOTE:: sphinx 1.3 switch to 'code' instead of 'tt' for literals #} |
| 2150 |
{% if sphinx_version_info < [1,3] %} |
| 2151 |
{% set code = "tt" %} |
| 2152 |
{% else %} |
| 2153 |
{% set code = "code" %} |
| 2154 |
{% endif %} |
| 2155 |
|
| 2156 |
{{ code }} |
| 2157 |
{ |
| 2158 |
font-family: {{ theme_codeblockfont }}; |
| 2159 |
font-size: 90%; |
| 2160 |
} |
| 2161 |
|
| 2162 |
{{ code }}.literal |
| 2163 |
{ |
| 2164 |
background-color: {{ theme_quotebgcolor }}; |
| 2165 |
border: 1px solid {{ theme_quotetrimcolor }}; |
| 2166 |
padding: 0px 4px; |
| 2167 |
margin: 1px; |
| 2168 |
|
| 2169 |
{{ border_radius("4px") }} |
| 2170 |
} |
| 2171 |
|
| 2172 |
p {{ code }}.literal { white-space: nowrap; } |
| 2173 |
|
| 2174 |
{{ code }}.samp.literal > em |
| 2175 |
{ |
| 2176 |
font-family: {{ theme_codevarfont or theme_codeblockfont }}; |
| 2177 |
padding: 0 1px; |
| 2178 |
{{ opacity(0.6) }} |
| 2179 |
} |
| 2180 |
|
| 2181 |
{{ code }}.samp.literal > em:before { content: "{"; } |
| 2182 |
{{ code }}.samp.literal > em:after { content: "}"; } |
| 2183 |
|
| 2184 |
h1 {{ code }}.literal |
| 2185 |
{ |
| 2186 |
{# background-color: inherit; |
| 2187 |
border: 0; #} |
| 2188 |
font-size: 80%; |
| 2189 |
} |
| 2190 |
|
| 2191 |
h1 {{ code }}.samp.literal > em |
| 2192 |
{ |
| 2193 |
font-weight: normal; |
| 2194 |
} |
| 2195 |
|
| 2196 |
div.sphinxsidebar {{ code }}.literal, |
| 2197 |
a.reference {{ code }}.literal, |
| 2198 |
div.related a {{ code }}.literal, |
| 2199 |
{{ code }}.literal.xref |
| 2200 |
{ |
| 2201 |
background-color: transparent; |
| 2202 |
border: none; |
| 2203 |
padding: 0; |
| 2204 |
margin: 0; |
| 2205 |
} |
| 2206 |
|
| 2207 |
.viewcode-back |
| 2208 |
{ |
| 2209 |
font-family: {{ theme_bodyfont }}; |
| 2210 |
} |
| 2211 |
|
| 2212 |
div.viewcode-block:target |
| 2213 |
{ |
| 2214 |
background-color: #f4debf; |
| 2215 |
border-top: 1px solid #ac9; |
| 2216 |
border-bottom: 1px solid #ac9; |
| 2217 |
} |
| 2218 |
|
| 2219 |
{# code block 'copybutton' #} |
| 2220 |
.highlight .copybutton |
| 2221 |
{ |
| 2222 |
position: absolute; |
| 2223 |
right: 0; |
| 2224 |
top: 0; |
| 2225 |
|
| 2226 |
margin: 0; |
| 2227 |
padding: 0 6px; |
| 2228 |
|
| 2229 |
background: transparent; |
| 2230 |
border: 1px solid transparent; |
| 2231 |
{{ border_radius(soft_corner_radius) }} |
| 2232 |
|
| 2233 |
font-size: 75%; |
| 2234 |
color: {{ theme_sidebartextcolor }}; |
| 2235 |
white-space: nowrap; |
| 2236 |
cursor: pointer; |
| 2237 |
} |
| 2238 |
|
| 2239 |
.highlight .copybutton.active |
| 2240 |
{ |
| 2241 |
text-decoration: line-through; |
| 2242 |
{{ opacity(0.8) }} |
| 2243 |
} |
| 2244 |
|
| 2245 |
.highlight:not(:hover) .copybutton:not(.active) |
| 2246 |
{ |
| 2247 |
{{ opacity(0.7) }} |
| 2248 |
} |
| 2249 |
|
| 2250 |
{#**************************************************** |
| 2251 |
# document - object description sections |
| 2252 |
# requires css classes to set by .ext.autodoc_sections |
| 2253 |
# |
| 2254 |
# NOTE: all sections nested w/in an object description will have the form: |
| 2255 |
# <div class="section desc-section desc-section-{LEVEL}"> |
| 2256 |
# <hN class="section-header">{TITLE}</hN> |
| 2257 |
# {CONTENT} |
| 2258 |
# </div> |
| 2259 |
#***************************************************#} |
| 2260 |
|
| 2261 |
{# styling for nested sections #} |
| 2262 |
.desc-section > .section-header |
| 2263 |
{ |
| 2264 |
position: relative; |
| 2265 |
} |
| 2266 |
|
| 2267 |
.desc-section-1 > .section-header |
| 2268 |
{ |
| 2269 |
{{ box_typography(h2_size, set_line=False, vert_margin=1) }} |
| 2270 |
border-bottom: 1px dotted {{ theme_nestedtextcolor or theme_sectionbgcolor }}; |
| 2271 |
color: {{ theme_nestedtextcolor or theme_sectionbgcolor }}; |
| 2272 |
} |
| 2273 |
|
| 2274 |
.desc-section-2 > .section-header |
| 2275 |
{ |
| 2276 |
color: {{ theme_nestedtextcolor or theme_sectionbgcolor }}; |
| 2277 |
} |
| 2278 |
|
| 2279 |
.desc-section > .section-header:before |
| 2280 |
{ |
| 2281 |
{# NOTE: data-nested-label is filled in by js code #} |
| 2282 |
content: attr(data-nested-label); |
| 2283 |
font-size: 0.75em; |
| 2284 |
opacity: 0.75; |
| 2285 |
letter-spacing: 1px; |
| 2286 |
font-style: italic; |
| 2287 |
} |
| 2288 |
|
| 2289 |
{# styling for object declarations #} |
| 2290 |
{% if theme_colored_objects in ["true", "row", "prefix"] %} |
| 2291 |
{#**************************************************** |
| 2292 |
# document - object definition styling |
| 2293 |
#***************************************************#} |
| 2294 |
{# XXX: if sphinx just added a common class to all these, |
| 2295 |
e.g. 'object' or 'objdesc', wouldn't need so many rules. #} |
| 2296 |
|
| 2297 |
{% set color_object_row = theme_colored_objects in ["true", "row"] %} |
| 2298 |
{% if color_object_row %} |
| 2299 |
{# color entire declaration #} |
| 2300 |
{% set unmarked_bg_suffix = "> dt" %} |
| 2301 |
{% set marked_bg_suffix = "> dt" %} |
| 2302 |
{% else %} |
| 2303 |
{# just color the prefix #} |
| 2304 |
{% set unmarked_bg_suffix = "> dt:before" %} |
| 2305 |
{% set marked_bg_suffix = "> dt > .property:first-child" %} |
| 2306 |
{% endif %} |
| 2307 |
|
| 2308 |
{# assign common row styling #} |
| 2309 |
dl.object {{ unmarked_bg_suffix }}, {# xxx: was this ever used by sphinx, or just misnamed dl.data? #} |
| 2310 |
dl.data {{ unmarked_bg_suffix }}, |
| 2311 |
dl.function {{ unmarked_bg_suffix }}, |
| 2312 |
dl.method {{ unmarked_bg_suffix }}, |
| 2313 |
dl.attribute {{ unmarked_bg_suffix }}, |
| 2314 |
dl.class {{ marked_bg_suffix }}, |
| 2315 |
dl.exception {{ marked_bg_suffix }}, |
| 2316 |
dl.classmethod {{ marked_bg_suffix }}, {# sphinx2 just renders these as "dl.method" #} |
| 2317 |
dl.staticmethod {{ marked_bg_suffix }} {# ditto ^^^ #} |
| 2318 |
{ |
| 2319 |
display: inline-block; |
| 2320 |
{% if color_object_row %} |
| 2321 |
padding: 0.3em 1em 0.3em 0.6em; |
| 2322 |
{% else %} |
| 2323 |
margin-right: 0.5em; |
| 2324 |
padding: 0.3em 0.6em; |
| 2325 |
{% endif %} |
| 2326 |
border: {{ theme_object_trim_color }} solid 1px; |
| 2327 |
border-width: 0 0 0 3px; |
| 2328 |
{{ border_radius(theme_object_radius) }} |
| 2329 |
} |
| 2330 |
|
| 2331 |
{% if color_object_row %} |
| 2332 |
{# added by JS helper -- removed padding on right if there's hidden headerlink #} |
| 2333 |
dl.has-headerlink {{ marked_bg_suffix }}, |
| 2334 |
dl.has-headerlink {{ unmarked_bg_suffix }} |
| 2335 |
{ |
| 2336 |
padding-right: 0; |
| 2337 |
} |
| 2338 |
{% endif %} |
| 2339 |
|
| 2340 |
{# assign type-specific row coloring/styling #} |
| 2341 |
dl.object {{ unmarked_bg_suffix }}, {# xxx: was this ever used by sphinx, or just misnamed dl.data? #} |
| 2342 |
dl.data {{ unmarked_bg_suffix }}, |
| 2343 |
dl.attribute {{ unmarked_bg_suffix }} |
| 2344 |
{ |
| 2345 |
background-color: |
| 2346 |
{{ theme_object_attribute_color or theme_object_default_color }}; |
| 2347 |
} |
| 2348 |
|
| 2349 |
dl.function {{ unmarked_bg_suffix }}, |
| 2350 |
dl.method {{ unmarked_bg_suffix }}, |
| 2351 |
dl.classmethod {{ marked_bg_suffix }}, {# sphinx2 just renders these as "dl.method" #} |
| 2352 |
dl.staticmethod {{ marked_bg_suffix }} {# ditto ^^^ #} |
| 2353 |
{ |
| 2354 |
background-color: |
| 2355 |
{{ theme_object_function_color or theme_object_default_color }}; |
| 2356 |
} |
| 2357 |
|
| 2358 |
dl.class {{ marked_bg_suffix }} |
| 2359 |
{ |
| 2360 |
background-color: |
| 2361 |
{{ theme_object_class_color or theme_object_default_color }}; |
| 2362 |
border-width: 0 0 0 6px; |
| 2363 |
} |
| 2364 |
|
| 2365 |
dl.exception {{ marked_bg_suffix }} |
| 2366 |
{ |
| 2367 |
background-color: |
| 2368 |
{{ theme_object_exception_color or theme_object_class_color or theme_object_default_color }}; |
| 2369 |
} |
| 2370 |
|
| 2371 |
{# assign common prefix styling #} |
| 2372 |
dl.object > dt:before, {# xxx: was this ever used by sphinx, or just misnamed dl.data? #} |
| 2373 |
dl.data > dt:before, |
| 2374 |
dl.function > dt:before, |
| 2375 |
dl.method > dt:before, |
| 2376 |
dl.attribute > dt:before, |
| 2377 |
dl.class > dt > .property:first-child, |
| 2378 |
dl.exception > dt > .property:first-child, |
| 2379 |
dl.classmethod > dt > .property:first-child, {# sphinx2 renders these as ".method" w/ ".property"; our js adds subtype="classmethod" to tag #} |
| 2380 |
dl.method[subtype] > dt > .property:first-child, {# ... so eventually only support this under sphinx 2 #} |
| 2381 |
dl.staticmethod > dt > .property:first-child {# ditto ^^^ #} |
| 2382 |
{ |
| 2383 |
font-size: 0.8em; |
| 2384 |
font-weight: bold; |
| 2385 |
font-style: italic; |
| 2386 |
letter-spacing: 0.1em; |
| 2387 |
color: {{ theme_object_type_color }}; |
| 2388 |
} |
| 2389 |
|
| 2390 |
{# assign type-specific prefix content #} |
| 2391 |
{% if theme_colored_object_prefixes in ["all", "nested"] %} |
| 2392 |
{% set nested_prefix = ".desc-section " if theme_colored_object_prefixes == "nested" else "" %} |
| 2393 |
|
| 2394 |
{{ nested_prefix }} dl.attribute > dt:before |
| 2395 |
{ |
| 2396 |
content: "attr"; |
| 2397 |
padding-right: 0.6em; |
| 2398 |
} |
| 2399 |
|
| 2400 |
{{ nested_prefix }} dl.function > dt:before |
| 2401 |
{ |
| 2402 |
content: "func"; |
| 2403 |
padding-right: 0.6em; |
| 2404 |
} |
| 2405 |
|
| 2406 |
{{ nested_prefix }} dl.method:not([subtype]) > dt:before |
| 2407 |
{ |
| 2408 |
content: "method"; |
| 2409 |
padding-right: 0.6em; |
| 2410 |
} |
| 2411 |
|
| 2412 |
{% elif theme_colored_object_prefixes != "default" %} |
| 2413 |
{{ css_warning("cloud.css_t: unknown 'colored_object_prefixes' value: %r"|format(theme_colored_object_prefixes)) }} |
| 2414 |
{% endif %} |
| 2415 |
|
| 2416 |
{% elif theme_colored_objects not in ["false", "none"] %} |
| 2417 |
{{ css_warning("cloud.css_t: unknown 'colored_objects' value: %r"|format(theme_colored_objects)) }} |
| 2418 |
{% endif %} |
| 2419 |
|
| 2420 |
dl > dt.highlighted |
| 2421 |
{ |
| 2422 |
background: {{ theme_highlightcolor }}; |
| 2423 |
} |
| 2424 |
|
| 2425 |
{# fix viewcode link positioning since DT is now inline #} |
| 2426 |
.viewcode-link |
| 2427 |
{ |
| 2428 |
position: absolute; |
| 2429 |
right: 0; |
| 2430 |
margin-right: 1.5em; |
| 2431 |
margin-right: calc(1em + 10px); |
| 2432 |
} |
| 2433 |
|
| 2434 |
{#**************************************************** |
| 2435 |
# index page styling |
| 2436 |
# requires classes set by .ext.index_styling |
| 2437 |
#***************************************************#} |
| 2438 |
|
| 2439 |
table.indextable span.category |
| 2440 |
{ |
| 2441 |
font-size: 80%; |
| 2442 |
font-style: italic; |
| 2443 |
color: {{ theme_index_category_color }}; |
| 2444 |
} |
| 2445 |
|
| 2446 |
table.indextable a, |
| 2447 |
table.indextable a:hover span.category |
| 2448 |
{ |
| 2449 |
color: {{ theme_linkcolor }}; |
| 2450 |
} |
| 2451 |
|
| 2452 |
table.indextable span.category span.location |
| 2453 |
{ |
| 2454 |
font-weight: bold; |
| 2455 |
} |
| 2456 |
|
| 2457 |
table.indextable td > dl > dt |
| 2458 |
{ |
| 2459 |
margin-bottom: .5em; |
| 2460 |
} |
| 2461 |
|
| 2462 |
table.indextable td > dl > dd > dl |
| 2463 |
{ |
| 2464 |
margin-top: -.5em; |
| 2465 |
margin-bottom: .5em; |
| 2466 |
} |
| 2467 |
|
| 2468 |
{#***************************************************** |
| 2469 |
# adapt for various page sizes & media |
| 2470 |
#****************************************************#} |
| 2471 |
|
| 2472 |
{# adapt for xlarge displays #} |
| 2473 |
@media only screen and (min-device-width: {{ theme_large_width }}) |
| 2474 |
{ |
| 2475 |
{{ render_media_rules("xlarge_screen") }} |
| 2476 |
} |
| 2477 |
|
| 2478 |
{# adapt for large displays #} |
| 2479 |
@media only screen and (min-width: {{ theme_max_width }}) |
| 2480 |
{ |
| 2481 |
{{ render_media_rules("large_screen") }} |
| 2482 |
} |
| 2483 |
|
| 2484 |
{# adapt for medium & up displays #} |
| 2485 |
@media only screen and (min-width: {{ theme_minimal_width }}) |
| 2486 |
{ |
| 2487 |
{{ render_media_rules("medium_up_screen") }} |
| 2488 |
|
| 2489 |
{# helper to omit small-only elements #} |
| 2490 |
.show-for-small { display: none !important; } |
| 2491 |
} |
| 2492 |
|
| 2493 |
{# adapt for medium & small displays #} |
| 2494 |
@media only screen and (max-width: {{ theme_max_width }}), |
| 2495 |
only screen and (max-width: {{ theme_minimal_width }}), |
| 2496 |
only screen and (max-device-width: {{ theme_minimal_width }}), |
| 2497 |
handheld |
| 2498 |
{ |
| 2499 |
{{ render_media_rules("medium_or_small_screen") }} |
| 2500 |
} |
| 2501 |
|
| 2502 |
{# adapt for small displays #} |
| 2503 |
@media only screen and (max-width: {{ theme_minimal_width }}), |
| 2504 |
only screen and (max-device-width: {{ theme_minimal_width }}), |
| 2505 |
handheld |
| 2506 |
{ |
| 2507 |
{{ render_media_rules("small_screen") }} |
| 2508 |
|
| 2509 |
{# helper to omit unimportant elements on small displays #} |
| 2510 |
.hide-for-small { display: none; } |
| 2511 |
} |
| 2512 |
|
| 2513 |
{# adapt for print media #} |
| 2514 |
@media print |
| 2515 |
{ |
| 2516 |
{{ render_media_rules("print") }} |
| 2517 |
} |
| 2518 |
|
| 2519 |
{{ render_css_warnings() }} |
| 2520 |
{#**************************************************** |
| 2521 |
# EOF |
| 2522 |
#***************************************************#} |