44 *
55 * Sphinx stylesheet -- basic theme.
66 *
7- * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
7+ * :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
88 * :license: BSD, see LICENSE for details.
99 *
1010 */
@@ -15,6 +15,12 @@ div.clearer {
1515 clear : both;
1616}
1717
18+ div .section ::after {
19+ display : block;
20+ content : '' ;
21+ clear : left;
22+ }
23+
1824/* -- relbar ---------------------------------------------------------------- */
1925
2026div .related {
@@ -271,25 +277,25 @@ p.rubric {
271277 font-weight : bold;
272278}
273279
274- img .align-left , .figure .align-left , object .align-left {
280+ img .align-left , figure . align-left , .figure .align-left , object .align-left {
275281 clear : left;
276282 float : left;
277283 margin-right : 1em ;
278284}
279285
280- img .align-right , .figure .align-right , object .align-right {
286+ img .align-right , figure . align-right , .figure .align-right , object .align-right {
281287 clear : right;
282288 float : right;
283289 margin-left : 1em ;
284290}
285291
286- img .align-center , .figure .align-center , object .align-center {
292+ img .align-center , figure . align-center , .figure .align-center , object .align-center {
287293 display : block;
288294 margin-left : auto;
289295 margin-right : auto;
290296}
291297
292- img .align-default , .figure .align-default {
298+ img .align-default , figure . align-default , .figure .align-default {
293299 display : block;
294300 margin-left : auto;
295301 margin-right : auto;
@@ -313,24 +319,31 @@ img.align-default, .figure.align-default {
313319
314320/* -- sidebars -------------------------------------------------------------- */
315321
316- div .sidebar {
322+ div .sidebar ,
323+ aside .sidebar {
317324 margin : 0 0 0.5em 1em ;
318325 border : 1px solid # ddb ;
319- padding : 7px 7 px 0 7 px ;
326+ padding : 7px ;
320327 background-color : # ffe ;
321328 width : 40% ;
322329 float : right;
330+ clear : right;
331+ overflow-x : auto;
323332}
324333
325334p .sidebar-title {
326335 font-weight : bold;
327336}
328337
338+ div .admonition , div .topic , blockquote {
339+ clear : left;
340+ }
341+
329342/* -- topics ---------------------------------------------------------------- */
330343
331344div .topic {
332345 border : 1px solid # ccc ;
333- padding : 7px 7 px 0 7 px ;
346+ padding : 7px ;
334347 margin : 10px 0 10px 0 ;
335348}
336349
@@ -352,10 +365,6 @@ div.admonition dt {
352365 font-weight : bold;
353366}
354367
355- div .admonition dl {
356- margin-bottom : 0 ;
357- }
358-
359368p .admonition-title {
360369 margin : 0px 10px 5px 0px ;
361370 font-weight : bold;
@@ -366,9 +375,30 @@ div.body p.centered {
366375 margin-top : 25px ;
367376}
368377
378+ /* -- content of sidebars/topics/admonitions -------------------------------- */
379+
380+ div .sidebar > : last-child ,
381+ aside .sidebar > : last-child ,
382+ div .topic > : last-child ,
383+ div .admonition > : last-child {
384+ margin-bottom : 0 ;
385+ }
386+
387+ div .sidebar ::after ,
388+ aside .sidebar ::after ,
389+ div .topic ::after ,
390+ div .admonition ::after ,
391+ blockquote ::after {
392+ display : block;
393+ content : '' ;
394+ clear : both;
395+ }
396+
369397/* -- tables ---------------------------------------------------------------- */
370398
371399table .docutils {
400+ margin-top : 10px ;
401+ margin-bottom : 10px ;
372402 border : 0 ;
373403 border-collapse : collapse;
374404}
@@ -416,32 +446,34 @@ table.citation td {
416446 border-bottom : none;
417447}
418448
419- th > p : first-child ,
420- td > p : first-child {
449+ th > : first-child ,
450+ td > : first-child {
421451 margin-top : 0px ;
422452}
423453
424- th > p : last-child ,
425- td > p : last-child {
454+ th > : last-child ,
455+ td > : last-child {
426456 margin-bottom : 0px ;
427457}
428458
429459/* -- figures --------------------------------------------------------------- */
430460
431- div .figure {
461+ div .figure , figure {
432462 margin : 0.5em ;
433463 padding : 0.5em ;
434464}
435465
436- div .figure p .caption {
466+ div .figure p .caption , figcaption {
437467 padding : 0.3em ;
438468}
439469
440- div .figure p .caption span .caption-number {
470+ div .figure p .caption span .caption-number ,
471+ figcaption span .caption-number {
441472 font-style : italic;
442473}
443474
444- div .figure p .caption span .caption-text {
475+ div .figure p .caption span .caption-text ,
476+ figcaption span .caption-text {
445477}
446478
447479/* -- field list styles ----------------------------------------------------- */
@@ -468,6 +500,10 @@ table.field-list td, table.field-list th {
468500
469501/* -- hlist styles ---------------------------------------------------------- */
470502
503+ table .hlist {
504+ margin : 1em 0 ;
505+ }
506+
471507table .hlist td {
472508 vertical-align : top;
473509}
@@ -495,17 +531,37 @@ ol.upperroman {
495531 list-style : upper-roman;
496532}
497533
498- li > p : first-child {
534+ : not (li ) > ol > li : first-child > : first-child ,
535+ : not (li ) > ul > li : first-child > : first-child {
499536 margin-top : 0px ;
500537}
501538
502- li > p : last-child {
539+ : not (li ) > ol > li : last-child > : last-child ,
540+ : not (li ) > ul > li : last-child > : last-child {
503541 margin-bottom : 0px ;
504542}
505543
544+ ol .simple ol p ,
545+ ol .simple ul p ,
546+ ul .simple ol p ,
547+ ul .simple ul p {
548+ margin-top : 0 ;
549+ }
550+
551+ ol .simple > li : not (: first-child ) > p ,
552+ ul .simple > li : not (: first-child ) > p {
553+ margin-top : 0 ;
554+ }
555+
556+ ol .simple p ,
557+ ul .simple p {
558+ margin-bottom : 0 ;
559+ }
560+
506561dl .footnote > dt ,
507562dl .citation > dt {
508563 float : left;
564+ margin-right : 0.5em ;
509565}
510566
511567dl .footnote > dd ,
546602 margin-bottom : 15px ;
547603}
548604
549- dd > p : first-child {
605+ dd > : first-child {
550606 margin-top : 0px ;
551607}
552608
@@ -560,6 +616,11 @@ dd {
560616 margin-left : 30px ;
561617}
562618
619+ dl > dd : last-child ,
620+ dl > dd : last-child > : last-child {
621+ margin-bottom : 0 ;
622+ }
623+
563624dt : target , span .highlighted {
564625 background-color : # fbe54e ;
565626}
@@ -637,29 +698,68 @@ pre {
637698 overflow-y : hidden; /* fixes display issues on Chrome browsers */
638699}
639700
701+ pre , div [class *= "highlight-" ] {
702+ clear : both;
703+ }
704+
640705span .pre {
641706 -moz-hyphens : none;
642707 -ms-hyphens : none;
643708 -webkit-hyphens : none;
644709 hyphens : none;
645710}
646711
712+ div [class *= "highlight-" ] {
713+ margin : 1em 0 ;
714+ }
715+
647716td .linenos pre {
648- padding : 5px 0px ;
649717 border : 0 ;
650718 background-color : transparent;
651719 color : # aaa ;
652720}
653721
654722table .highlighttable {
655- margin-left : 0.5em ;
723+ display : block;
724+ }
725+
726+ table .highlighttable tbody {
727+ display : block;
728+ }
729+
730+ table .highlighttable tr {
731+ display : flex;
656732}
657733
658734table .highlighttable td {
659- padding : 0 0.5em 0 0.5em ;
735+ margin : 0 ;
736+ padding : 0 ;
737+ }
738+
739+ table .highlighttable td .linenos {
740+ padding-right : 0.5em ;
741+ }
742+
743+ table .highlighttable td .code {
744+ flex : 1 ;
745+ overflow : hidden;
746+ }
747+
748+ .highlight .hll {
749+ display : block;
750+ }
751+
752+ div .highlight pre ,
753+ table .highlighttable pre {
754+ margin : 0 ;
755+ }
756+
757+ div .code-block-caption + div {
758+ margin-top : 0 ;
660759}
661760
662761div .code-block-caption {
762+ margin-top : 1em ;
663763 padding : 2px 5px ;
664764 font-size : small;
665765}
@@ -668,10 +768,8 @@ div.code-block-caption code {
668768 background-color : transparent;
669769}
670770
671- div .code-block-caption + div > div .highlight > pre {
672- margin-top : 0 ;
673- }
674-
771+ table .highlighttable td .linenos ,
772+ span .linenos ,
675773div .doctest > div .highlight span .gp { /* gp: Generic.Prompt */
676774 user-select : none;
677775}
@@ -685,11 +783,7 @@ div.code-block-caption span.caption-text {
685783}
686784
687785div .literal-block-wrapper {
688- padding : 1em 1em 0 ;
689- }
690-
691- div .literal-block-wrapper div .highlight {
692- margin : 0 ;
786+ margin : 1em 0 ;
693787}
694788
695789code .descname {
@@ -740,8 +834,7 @@ span.eqno {
740834}
741835
742836span .eqno a .headerlink {
743- position : relative;
744- left : 0px ;
837+ position : absolute;
745838 z-index : 1 ;
746839}
747840
0 commit comments