Skip to content

Commit 9ee4f54

Browse files
committed
Make line-numbers styles more specific
The padding added to `pre.line-numbers` in the line-number's CSS is overwritten by the theme's CSS if the theme is loaded second. This ensures the CSS can come in any order without specificity issues.
1 parent 84935ac commit 9ee4f54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/line-numbers/prism-line-numbers.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
pre.line-numbers {
1+
pre[class*="language-"].line-numbers {
22
position: relative;
33
padding-left: 3.8em;
44
counter-reset: linenumber;
55
}
66

7-
pre.line-numbers > code {
7+
pre[class*="language-"].line-numbers > code {
88
position: relative;
9-
white-space: inherit;
9+
white-space: inherit;
1010
}
1111

1212
.line-numbers .line-numbers-rows {
@@ -38,4 +38,4 @@ pre.line-numbers > code {
3838
display: block;
3939
padding-right: 0.8em;
4040
text-align: right;
41-
}
41+
}

0 commit comments

Comments
 (0)