Skip to content

Commit c2e98c6

Browse files
committed
Port theme CSS to support page generated with docutils>=0.17
Partially backported the changes from: - readthedocs/sphinx_rtd_theme#1185 - readthedocs/sphinx_rtd_theme#1199 BUG: 440203
1 parent a039fd4 commit c2e98c6

File tree

1 file changed

+67
-9
lines changed

1 file changed

+67
-9
lines changed

theme/static/css/theme.css

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,15 @@ small {
360360
p,
361361
h2,
362362
.rst-content .toctree-wrapper p.caption,
363+
.rst-content .toctree-wrapper figcaption > p,
363364
h3 {
364365
orphans: 3;
365366
widows: 3;
366367
}
367368

368369
h2,
369370
.rst-content .toctree-wrapper p.caption,
371+
.rst-content .toctree-wrapper figcaption > p,
370372
h3 {
371373
page-break-after: avoid;
372374
}
@@ -386,6 +388,7 @@ small {
386388
.rst-content dl dt .headerlink::before,
387389
.rst-content table > caption .headerlink::before,
388390
.rst-content p.caption .headerlink::before,
391+
.rst-content figcaption .headerlink::before,
389392
.rst-content tt.download span:first-child::before,
390393
.rst-content code.download span:first-child::before,
391394
.icon::before,
@@ -478,6 +481,7 @@ textarea,
478481
.rst-content h6 .headerlink,
479482
.rst-content dl dt .headerlink,
480483
.rst-content p.caption .headerlink,
484+
.rst-content figcaption .headerlink,
481485
.rst-content table > caption .headerlink,
482486
.rst-content tt.download span:first-child,
483487
.rst-content code.download span:first-child,
@@ -566,6 +570,7 @@ textarea,
566570
.rst-content h6 .fa-pull-left.headerlink,
567571
.rst-content dl dt .fa-pull-left.headerlink,
568572
.rst-content p.caption .fa-pull-left.headerlink,
573+
.rst-content figcaption .fa-pull-left.headerlink,
569574
.rst-content table > caption .fa-pull-left.headerlink,
570575
.rst-content tt.download span.fa-pull-left:first-child,
571576
.rst-content code.download span.fa-pull-left:first-child,
@@ -586,6 +591,7 @@ textarea,
586591
.rst-content h6 .fa-pull-right.headerlink,
587592
.rst-content dl dt .fa-pull-right.headerlink,
588593
.rst-content p.caption .fa-pull-right.headerlink,
594+
.rst-content figcaption .fa-pull-right.headerlink,
589595
.rst-content table > caption .fa-pull-right.headerlink,
590596
.rst-content tt.download span.fa-pull-right:first-child,
591597
.rst-content code.download span.fa-pull-right:first-child,
@@ -614,6 +620,7 @@ textarea,
614620
.rst-content h6 .pull-left.headerlink,
615621
.rst-content dl dt .pull-left.headerlink,
616622
.rst-content p.caption .pull-left.headerlink,
623+
.rst-content figcaption .pull-left.headerlink,
617624
.rst-content table > caption .pull-left.headerlink,
618625
.rst-content tt.download span.pull-left:first-child,
619626
.rst-content code.download span.pull-left:first-child,
@@ -634,6 +641,7 @@ textarea,
634641
.rst-content h6 .pull-right.headerlink,
635642
.rst-content dl dt .pull-right.headerlink,
636643
.rst-content p.caption .pull-right.headerlink,
644+
.rst-content figcaption .pull-right.headerlink,
637645
.rst-content table > caption .pull-right.headerlink,
638646
.rst-content tt.download span.pull-right:first-child,
639647
.rst-content code.download span.pull-right:first-child,
@@ -3609,6 +3617,7 @@ textarea,
36093617
.rst-content h6 .headerlink,
36103618
.rst-content dl dt .headerlink,
36113619
.rst-content p.caption .headerlink,
3620+
.rst-content figcaption .headerlink,
36123621
.rst-content table > caption .headerlink,
36133622
.rst-content tt.download span:first-child,
36143623
.rst-content code.download span:first-child,
@@ -3634,6 +3643,7 @@ textarea,
36343643
.rst-content h6 .headerlink::before,
36353644
.rst-content dl dt .headerlink::before,
36363645
.rst-content p.caption .headerlink::before,
3646+
.rst-content figcaption .headerlink::before,
36373647
.rst-content table > caption .headerlink::before,
36383648
.rst-content tt.download span:first-child::before,
36393649
.rst-content code.download span:first-child::before,
@@ -3673,7 +3683,9 @@ a .rst-content h6 .headerlink,
36733683
a .rst-content dl dt .headerlink,
36743684
.rst-content dl dt a .headerlink,
36753685
a .rst-content p.caption .headerlink,
3686+
a .rst-content figcaption .headerlink,
36763687
.rst-content p.caption a .headerlink,
3688+
.rst-content figcaption a .headerlink,
36773689
a .rst-content table > caption .headerlink,
36783690
.rst-content table > caption a .headerlink,
36793691
a .rst-content tt.download span:first-child,
@@ -3709,7 +3721,9 @@ a .icon {
37093721
.btn .rst-content dl dt .headerlink,
37103722
.rst-content dl dt .btn .headerlink,
37113723
.btn .rst-content p.caption .headerlink,
3724+
.btn .rst-content figcaption .headerlink,
37123725
.rst-content p.caption .btn .headerlink,
3726+
.rst-content figcaption .btn .headerlink,
37133727
.btn .rst-content table > caption .headerlink,
37143728
.rst-content table > caption .btn .headerlink,
37153729
.btn .rst-content tt.download span:first-child,
@@ -3741,7 +3755,9 @@ a .icon {
37413755
.nav .rst-content dl dt .headerlink,
37423756
.rst-content dl dt .nav .headerlink,
37433757
.nav .rst-content p.caption .headerlink,
3758+
.nav .rst-content figcaption .headerlink,
37443759
.rst-content p.caption .nav .headerlink,
3760+
.rst-content figcaption .nav .headerlink,
37453761
.nav .rst-content table > caption .headerlink,
37463762
.rst-content table > caption .nav .headerlink,
37473763
.nav .rst-content tt.download span:first-child,
@@ -3772,7 +3788,9 @@ a .icon {
37723788
.btn .rst-content dl dt .fa-large.headerlink,
37733789
.rst-content dl dt .btn .fa-large.headerlink,
37743790
.btn .rst-content p.caption .fa-large.headerlink,
3791+
.btn .rst-content figcaption .fa-large.headerlink,
37753792
.rst-content p.caption .btn .fa-large.headerlink,
3793+
.rst-content figcaption .btn .fa-large.headerlink,
37763794
.btn .rst-content table > caption .fa-large.headerlink,
37773795
.rst-content table > caption .btn .fa-large.headerlink,
37783796
.btn .rst-content tt.download span.fa-large:first-child,
@@ -3800,7 +3818,9 @@ a .icon {
38003818
.nav .rst-content dl dt .fa-large.headerlink,
38013819
.rst-content dl dt .nav .fa-large.headerlink,
38023820
.nav .rst-content p.caption .fa-large.headerlink,
3821+
.nav .rst-content figcaption .fa-large.headerlink,
38033822
.rst-content p.caption .nav .fa-large.headerlink,
3823+
.rst-content figcaption .nav .fa-large.headerlink,
38043824
.nav .rst-content table > caption .fa-large.headerlink,
38053825
.rst-content table > caption .nav .fa-large.headerlink,
38063826
.nav .rst-content tt.download span.fa-large:first-child,
@@ -3831,7 +3851,9 @@ a .icon {
38313851
.btn .rst-content dl dt .fa-spin.headerlink,
38323852
.rst-content dl dt .btn .fa-spin.headerlink,
38333853
.btn .rst-content p.caption .fa-spin.headerlink,
3854+
.btn .rst-content figcaption .fa-spin.headerlink,
38343855
.rst-content p.caption .btn .fa-spin.headerlink,
3856+
.rst-content figcaption .btn .fa-spin.headerlink,
38353857
.btn .rst-content table > caption .fa-spin.headerlink,
38363858
.rst-content table > caption .btn .fa-spin.headerlink,
38373859
.btn .rst-content tt.download span.fa-spin:first-child,
@@ -3859,7 +3881,9 @@ a .icon {
38593881
.nav .rst-content dl dt .fa-spin.headerlink,
38603882
.rst-content dl dt .nav .fa-spin.headerlink,
38613883
.nav .rst-content p.caption .fa-spin.headerlink,
3884+
.nav .rst-content figcaption .fa-spin.headerlink,
38623885
.rst-content p.caption .nav .fa-spin.headerlink,
3886+
.rst-content figcaption .nav .fa-spin.headerlink,
38633887
.nav .rst-content table > caption .fa-spin.headerlink,
38643888
.rst-content table > caption .nav .fa-spin.headerlink,
38653889
.nav .rst-content tt.download span.fa-spin:first-child,
@@ -3881,6 +3905,7 @@ a .icon {
38813905
.rst-content h6 .btn.headerlink::before,
38823906
.rst-content dl dt .btn.headerlink::before,
38833907
.rst-content p.caption .btn.headerlink::before,
3908+
.rst-content figcaption .btn.headerlink::before,
38843909
.rst-content table > caption .btn.headerlink::before,
38853910
.rst-content tt.download span.btn:first-child::before,
38863911
.rst-content code.download span.btn:first-child::before,
@@ -3902,6 +3927,7 @@ a .icon {
39023927
.rst-content h6 .btn.headerlink:hover::before,
39033928
.rst-content dl dt .btn.headerlink:hover::before,
39043929
.rst-content p.caption .btn.headerlink:hover::before,
3930+
.rst-content figcaption .btn.headerlink:hover::before,
39053931
.rst-content table > caption .btn.headerlink:hover::before,
39063932
.rst-content tt.download span.btn:first-child:hover::before,
39073933
.rst-content code.download span.btn:first-child:hover::before,
@@ -3929,7 +3955,9 @@ a .icon {
39293955
.btn-mini .rst-content dl dt .headerlink::before,
39303956
.rst-content dl dt .btn-mini .headerlink::before,
39313957
.btn-mini .rst-content p.caption .headerlink::before,
3958+
.btn-mini .rst-content figcaption .headerlink::before,
39323959
.rst-content p.caption .btn-mini .headerlink::before,
3960+
.rst-content figcaption .btn-mini .headerlink::before,
39333961
.btn-mini .rst-content table > caption .headerlink::before,
39343962
.rst-content table > caption .btn-mini .headerlink::before,
39353963
.btn-mini .rst-content tt.download span:first-child::before,
@@ -5625,6 +5653,7 @@ a.wy-text-neutral:hover {
56255653
h1,
56265654
h2,
56275655
.rst-content .toctree-wrapper p.caption,
5656+
.rst-content .toctree-wrapper figcaption > p,
56285657
h3,
56295658
h4,
56305659
h5,
@@ -5676,13 +5705,15 @@ code.code-large,
56765705

56775706
.wy-plain-list-disc,
56785707
.rst-content .section ul,
5708+
.rst-content section ul,
56795709
.rst-content .toctree-wrapper ul,
56805710
article ul {
56815711
margin-bottom: 24px;
56825712
}
56835713

56845714
.wy-plain-list-disc li,
56855715
.rst-content .section ul li,
5716+
.rst-content section ul li,
56865717
.rst-content .toctree-wrapper ul li,
56875718
article ul li {
56885719
margin-left: 24px;
@@ -5691,6 +5722,7 @@ article ul li {
56915722

56925723
.wy-plain-list-disc li p:last-child,
56935724
.rst-content .section ul li p:last-child,
5725+
.rst-content section ul li p:last-child,
56945726
.rst-content .toctree-wrapper ul li p:last-child,
56955727
article ul li p:last-child {
56965728
margin-bottom: 0;
@@ -5699,6 +5731,7 @@ article ul li p:last-child {
56995731

57005732
.wy-plain-list-disc li ul,
57015733
.rst-content .section ul li ul,
5734+
.rst-content section ul li ul,
57025735
.rst-content .toctree-wrapper ul li ul,
57035736
article ul li ul {
57045737
margin-bottom: 0;
@@ -5707,6 +5740,7 @@ article ul li ul {
57075740

57085741
.wy-plain-list-decimal,
57095742
.rst-content .section ol,
5743+
.rst-content section ol,
57105744
.rst-content ol.arabic,
57115745
article ol {
57125746
line-height: 24px;
@@ -5715,20 +5749,23 @@ article ol {
57155749

57165750
.wy-plain-list-decimal li,
57175751
.rst-content .section ol li,
5752+
.rst-content section ol li,
57185753
.rst-content ol.arabic li,
57195754
article ol li {
57205755
margin-left: 24px;
57215756
}
57225757

57235758
.wy-plain-list-decimal li p:last-child,
57245759
.rst-content .section ol li p:last-child,
5760+
.rst-content section ol li p:last-child,
57255761
.rst-content ol.arabic li p:last-child,
57265762
article ol li p:last-child {
57275763
margin-bottom: 0;
57285764
}
57295765

57305766
.wy-plain-list-decimal li ul,
57315767
.rst-content .section ol li ul,
5768+
.rst-content section ol li ul,
57325769
.rst-content ol.arabic li ul,
57335770
article ol li ul {
57345771
margin-bottom: 0;
@@ -5879,7 +5916,8 @@ ul > li {
58795916
}
58805917

58815918
.wy-menu-vertical header,
5882-
.wy-menu-vertical p.caption {
5919+
.wy-menu-vertical p.caption,
5920+
.wy-menu-vertical figcaption > p {
58835921
height: 32px;
58845922
line-height: 32px;
58855923
padding: 0 1.618em;
@@ -6487,7 +6525,9 @@ footer span.commit .rst-content tt,
64876525
.rst-versions .rst-current-version .rst-content dl dt .headerlink,
64886526
.rst-content dl dt .rst-versions .rst-current-version .headerlink,
64896527
.rst-versions .rst-current-version .rst-content p.caption .headerlink,
6528+
.rst-versions .rst-current-version .rst-content figcaption .headerlink,
64906529
.rst-content p.caption .rst-versions .rst-current-version .headerlink,
6530+
.rst-content figcaption .rst-versions .rst-current-version .headerlink,
64916531
.rst-versions .rst-current-version .rst-content table > caption .headerlink,
64926532
.rst-content table > caption .rst-versions .rst-current-version .headerlink,
64936533
.rst-versions .rst-current-version .rst-content tt.download span:first-child,
@@ -6608,24 +6648,30 @@ footer span.commit .rst-content tt,
66086648
height: auto;
66096649
}
66106650

6611-
.rst-content div.figure {
6651+
.rst-content div.figure,
6652+
.rst-content figure {
66126653
margin-bottom: 24px;
66136654
}
66146655

6615-
.rst-content div.figure p.caption {
6656+
.rst-content div.figure .caption-text,
6657+
.rst-content figure .caption-text {
66166658
font-style: italic;
66176659
}
66186660

6619-
.rst-content div.figure p:last-child.caption {
6661+
.rst-content div.figure p:last-child.caption,
6662+
.rst-content div.figure figcaption:last-child > p {
66206663
margin-bottom: 0;
66216664
}
66226665

6623-
.rst-content div.figure.align-center {
6666+
.rst-content div.figure.align-center,
6667+
.rst-content figure.align-center {
66246668
text-align: center;
66256669
}
66266670

66276671
.rst-content .section > img,
6628-
.rst-content .section > a > img {
6672+
.rst-content section > img,
6673+
.rst-content .section > a > img,
6674+
.rst-content section > a > img {
66296675
margin-bottom: 24px;
66306676
}
66316677

@@ -6728,17 +6774,23 @@ footer span.commit .rst-content tt,
67286774
}
67296775

67306776
.rst-content .section ol.loweralpha,
6731-
.rst-content .section ol.loweralpha li {
6777+
.rst-content section ol.loweralpha,
6778+
.rst-content .section ol.loweralpha li,
6779+
.rst-content section ol.loweralpha li {
67326780
list-style: lower-alpha;
67336781
}
67346782

67356783
.rst-content .section ol.upperalpha,
6736-
.rst-content .section ol.upperalpha li {
6784+
.rst-content section ol.upperalpha,
6785+
.rst-content .section ol.upperalpha li,
6786+
.rst-content section ol.upperalpha li {
67376787
list-style: upper-alpha;
67386788
}
67396789

67406790
.rst-content .section ol p,
6741-
.rst-content .section ul p {
6791+
.rst-content section ol p,
6792+
.rst-content .section ul p,
6793+
.rst-content section ul p {
67426794
margin-bottom: 12px;
67436795
}
67446796

@@ -6779,12 +6831,14 @@ footer span.commit .rst-content tt,
67796831
.rst-content h1 .headerlink,
67806832
.rst-content h2 .headerlink,
67816833
.rst-content .toctree-wrapper p.caption .headerlink,
6834+
.rst-content .toctree-wrapper figcaption .headerlink,
67826835
.rst-content h3 .headerlink,
67836836
.rst-content h4 .headerlink,
67846837
.rst-content h5 .headerlink,
67856838
.rst-content h6 .headerlink,
67866839
.rst-content dl dt .headerlink,
67876840
.rst-content p.caption .headerlink,
6841+
.rst-content figcaption .headerlink,
67886842
.rst-content table > caption .headerlink {
67896843
visibility: hidden;
67906844
font-size: 14px;
@@ -6793,12 +6847,14 @@ footer span.commit .rst-content tt,
67936847
.rst-content h1 .headerlink::after,
67946848
.rst-content h2 .headerlink::after,
67956849
.rst-content .toctree-wrapper p.caption .headerlink::after,
6850+
.rst-content .toctree-wrapper figcaption .headerlink::after,
67966851
.rst-content h3 .headerlink::after,
67976852
.rst-content h4 .headerlink::after,
67986853
.rst-content h5 .headerlink::after,
67996854
.rst-content h6 .headerlink::after,
68006855
.rst-content dl dt .headerlink::after,
68016856
.rst-content p.caption .headerlink::after,
6857+
.rst-content figcaption .headerlink::after,
68026858
.rst-content table > caption .headerlink::after {
68036859
content: "";
68046860
font-family: FontAwesome;
@@ -6807,12 +6863,14 @@ footer span.commit .rst-content tt,
68076863
.rst-content h1:hover .headerlink::after,
68086864
.rst-content h2:hover .headerlink::after,
68096865
.rst-content .toctree-wrapper p.caption:hover .headerlink::after,
6866+
.rst-content .toctree-wrapper figcaption:hover .headerlink::after,
68106867
.rst-content h3:hover .headerlink::after,
68116868
.rst-content h4:hover .headerlink::after,
68126869
.rst-content h5:hover .headerlink::after,
68136870
.rst-content h6:hover .headerlink::after,
68146871
.rst-content dl dt:hover .headerlink::after,
68156872
.rst-content p.caption:hover .headerlink::after,
6873+
.rst-content figcaption:hover .headerlink::after,
68166874
.rst-content table > caption:hover .headerlink::after {
68176875
visibility: visible;
68186876
}

0 commit comments

Comments
 (0)