Skip to content

Commit 9ae01ab

Browse files
authored
Apply section styles to divs as well. (#3869)
The pub.dev infrastructure may rewrite `section` HTML tags to be `div` tags, in generated HTML output. While that is going on, we can apply many styles to both `section` and `div` tags. See #3851 (comment) for discussion.
1 parent 0d0bf4a commit 9ae01ab

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/resources/styles.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ a {
314314
}
315315

316316
section {
317+
/* Note that the generated HTML for pub packages may have `section` tags
318+
transformed into `div` tags. */
317319
margin-bottom: 36px;
318320
}
319321

@@ -462,7 +464,9 @@ dt.constant + dd p {
462464
}
463465

464466
/* indents wrapped lines */
465-
section.summary dt {
467+
/* Note that the generated HTML for pub packages may have `section` tags
468+
transformed into `div` tags, so we have two selectors here. */
469+
section.summary dt, div.summary dt {
466470
margin-left: 24px;
467471
text-indent: -24px;
468472
}
@@ -820,7 +824,10 @@ ol.breadcrumbs li a {
820824
font-style: italic;
821825
}
822826

823-
section.multi-line-signature div.parameters {
827+
/* Note that the generated HTML for pub packages may have `section` tags
828+
transformed into `div` tags, so we have two selectors here. */
829+
section.multi-line-signature div.parameters,
830+
div.multi-line-signature div.parameters {
824831
margin-left: 24px;
825832
}
826833

@@ -1213,7 +1220,9 @@ a.tt-container {
12131220
box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
12141221
}
12151222

1216-
section#setter {
1223+
/* Note that the generated HTML for pub packages may have `section` tags
1224+
transformed into `div` tags, so we have two selectors here. */
1225+
section#setter, div#setter {
12171226
border-top: 1px solid #ddd;
12181227
padding-top: 36px;
12191228
}

0 commit comments

Comments
 (0)