Skip to content

Commit

Permalink
Line Highlight: Fixed print background color (#2668)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 28, 2020
1 parent e644178 commit cdb24ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/line-highlight/prism-line-highlight.css
Expand Up @@ -19,6 +19,17 @@ pre[data-line] {
white-space: pre;
}

@media print {
.line-highlight {
/*
* This will prevent browsers from replacing the background color with white.
* It's necessary because the element is layered on top of the displayed code.
*/
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
}

.line-highlight:before,
.line-highlight[data-end]:after {
content: attr(data-start);
Expand Down

0 comments on commit cdb24ab

Please sign in to comment.