Skip to content

Commit 500e9f5

Browse files
authored
Relocate due to print stylesheet caching (#13645)
1 parent d1a4ed0 commit 500e9f5

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

dotcom-rendering/src/lib/rootStyles.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,17 @@ export const rootStyles = (
5050
color: ${sourcePalette.neutral[7]};
5151
}
5252
53+
/**
54+
* Hide scroll depth markers when printing as these are absolutely positioned
55+
* based on the initial content height. These will still be present in the
56+
* document at their original location when printing, even if other page
57+
* elements have been hidden, leading to blank pages being produced.
58+
*/
59+
@media print {
60+
.scroll-depth-marker {
61+
display: none;
62+
}
63+
}
64+
5365
${rootAdStyles}
5466
`;

dotcom-rendering/src/static/css/print.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,3 @@
22
display: none !important;
33
color: #000000;
44
}
5-
6-
/**
7-
* Hide scroll depth markers when printing as these are absolutely positioned
8-
* based on the initial content height and are still present when content has
9-
* been hidden in the print layout, causing blank pages to be printed.
10-
*/
11-
.scroll-depth-marker {
12-
display: none;
13-
}

0 commit comments

Comments
 (0)