Skip to content

Commit cdb24ab

Browse files
Line Highlight: Fixed print background color (#2668)
1 parent e644178 commit cdb24ab

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plugins/line-highlight/prism-line-highlight.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ pre[data-line] {
1919
white-space: pre;
2020
}
2121

22+
@media print {
23+
.line-highlight {
24+
/*
25+
* This will prevent browsers from replacing the background color with white.
26+
* It's necessary because the element is layered on top of the displayed code.
27+
*/
28+
-webkit-print-color-adjust: exact;
29+
color-adjust: exact;
30+
}
31+
}
32+
2233
.line-highlight:before,
2334
.line-highlight[data-end]:after {
2435
content: attr(data-start);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy