Skip to content

Commit fd5a945

Browse files
Rollup merge of rust-lang#44192 - GuillaumeGomez:sub-fields-style, r=QuietMisdreavus
Fix invalid display of enum sub-fields docs Before: <img width="1440" alt="screen shot 2017-08-30 at 23 17 00" src="https://user-images.githubusercontent.com/3050060/29895433-61f2bf8c-8dd9-11e7-83e8-cf1dca878100.png"> After: <img width="1440" alt="screen shot 2017-08-30 at 23 16 48" src="https://user-images.githubusercontent.com/3050060/29895441-66dea042-8dd9-11e7-9576-11b0c770c70b.png"> cc @nox @rust-lang/docs
2 parents 97b01ab + bde0071 commit fd5a945

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/librustdoc/html/static/rustdoc.css

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -658,11 +658,13 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
658658

659659
.toggle-wrapper {
660660
position: relative;
661+
margin-top: 5px;
661662
}
662663

663664
.toggle-wrapper.collapsed {
664-
height: 1em;
665+
height: 25px;
665666
transition: height .2s;
667+
margin-bottom: .6em;
666668
}
667669

668670
.collapse-toggle > .inner {
@@ -704,14 +706,16 @@ span.since {
704706
margin-top: 5px;
705707
}
706708

707-
.variant + .toggle-wrapper > a {
708-
margin-top: 5px;
709-
}
710-
711709
.sub-variant, .sub-variant > h3 {
712710
margin-top: 0 !important;
713711
}
714712

713+
.toggle-label {
714+
display: inline-block;
715+
margin-left: 4px;
716+
margin-top: 3px;
717+
}
718+
715719
.enum > .toggle-wrapper + .docblock, .struct > .toggle-wrapper + .docblock {
716720
margin-left: 30px;
717721
margin-bottom: 20px;

0 commit comments

Comments
 (0)