Skip to content

Commit

Permalink
Make line-numbers styles more specific
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mAAdhaTTah committed Jun 1, 2018
1 parent 84935ac commit 9ee4f54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/line-numbers/prism-line-numbers.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pre.line-numbers {
pre[class*="language-"].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}

pre.line-numbers > code {
pre[class*="language-"].line-numbers > code {
position: relative;
white-space: inherit;
white-space: inherit;
}

.line-numbers .line-numbers-rows {
Expand Down Expand Up @@ -38,4 +38,4 @@ pre.line-numbers > code {
display: block;
padding-right: 0.8em;
text-align: right;
}
}

0 comments on commit 9ee4f54

Please sign in to comment.