Skip to content

Commit d564509

Browse files
committed
Use CSS nesting, add caption adjustment
1 parent cffb2f5 commit d564509

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

src/css/admonition.css

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
/* Apply padding-top only for admonitions which only contain a code block */
2-
.doc .admonitionblock.code-rule td.content:has(div.listingblock) {
3-
padding: 1rem 0 0 0 !important;
4-
}
1+
.doc .admonitionblock.code-rule {
2+
/* Apply padding-top only for admonitions which only contain a code block */
3+
& td.content:has(div.listingblock) {
4+
padding: 1rem 0 0 0 !important;
5+
}
56

6-
/* Disable box shadow for code blocks inside code rule admonitions */
7-
.doc .admonitionblock.code-rule td.content div.listingblock pre.highlight code {
8-
box-shadow: none;
9-
}
7+
/* Disable box shadow for code blocks inside code rule admonitions */
8+
& td.content div.listingblock pre.highlight code {
9+
box-shadow: none;
10+
}
1011

11-
/* Change color of the "important" admonition back to the default red */
12-
.doc .admonitionblock.code-rule td.icon i.icon-important {
13-
background-color: #e40046;
14-
}
12+
/* Change color of the "important" admonition back to the default red */
13+
& td.icon i.icon-important {
14+
background-color: #e40046;
15+
}
16+
17+
/* Don't use uppercase for captions */
18+
& .icon {
19+
text-transform: none;
20+
}
21+
}

0 commit comments

Comments
 (0)