Skip to content

Commit 90f71fe

Browse files
authored
Merge pull request #274 from wpengine/code-figcaption-styling
Code Block style enhancements
2 parents c586543 + d723297 commit 90f71fe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/pages/global.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,15 @@ code[data-line-numbers-max-digits="4"] > [data-line]::before {
190190
width: 2.25rem;
191191
}
192192

193+
figcaption + pre {
194+
border-top-left-radius: 0;
195+
border-top-right-radius: 0;
196+
}
197+
198+
pre {
199+
border: 1px solid #444c56;
200+
}
201+
193202
/* Line highlights https://rehype-pretty.pages.dev/#highlight-lines*/
194203
span[data-highlighted-line] {
195204
background-color: rgba(100, 123, 255, 0.2);
@@ -226,6 +235,15 @@ span[data-highlighted-line] {
226235
color: red;
227236
}
228237

238+
figcaption[data-language] {
239+
border-top-left-radius: 0.375rem;
240+
border-top-right-radius: 0.375rem;
241+
border: 1px solid #444c56;
242+
border-bottom: none;
243+
padding: 0.8571429em 1.1428571em;
244+
background-color: #1c2128;
245+
}
246+
229247
figcaption[data-language]::after {
230248
content: attr(data-language);
231249
float: right;

0 commit comments

Comments
 (0)