Skip to content

Commit 22f2494

Browse files
fix: Improve print version in dark mode (#442)
Resolves #365 Co-authored-by: Robert Schuster <robert.r.schuster@deutschebahn.com>
1 parent 15ae4e0 commit 22f2494

File tree

5 files changed

+39
-18
lines changed

5 files changed

+39
-18
lines changed

assets/sass/_variables.scss

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,31 @@ html {
4040
--border: 0.1rem solid transparent;
4141
--pagefind-ui-font: roboto, Arial, Helvetica, sans-serif;
4242
--outline-focus-indicator: #257fa8;
43+
44+
@media print {
45+
--bg-neutral: white;
46+
}
4347
}
4448

4549
html[data-theme="dark"] {
46-
--pagefind-ui-text: #fff;
47-
--link-default: #ff6b3d;
48-
--link-hovered: #ff8a5b;
49-
--link-special: #ffffff;
50-
--bg-default: #151b23;
51-
--bg-neutral: #0d1117;
52-
--color-onLight: #ffffff;
53-
--color-table-border: #555;
54-
--color-body: #e0e0e0;
55-
--pagefind-ui-border: #555;
56-
--box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.5);
57-
--box-shadow-light: 0.4rem 0.4rem 0.4rem rgba(0, 0, 0, 0.3);
58-
--pagefind-ui-background: var(--bg-default);
59-
--highlight-color-tip: #1a4a5c;
60-
--highlight-color-inofficial: #2a2d30;
61-
--highlight-color-important: #4a2a1a;
62-
--border: 0.1rem solid #3d444d;
63-
--outline-focus-indicator: #2e9acb;
50+
@media screen {
51+
--pagefind-ui-text: #fff;
52+
--link-default: #ff6b3d;
53+
--link-hovered: #ff8a5b;
54+
--link-special: #ffffff;
55+
--bg-default: #151b23;
56+
--bg-neutral: #0d1117;
57+
--color-onLight: #ffffff;
58+
--color-table-border: #555;
59+
--color-body: #e0e0e0;
60+
--pagefind-ui-border: #555;
61+
--box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.5);
62+
--box-shadow-light: 0.4rem 0.4rem 0.4rem rgba(0, 0, 0, 0.3);
63+
--pagefind-ui-background: var(--bg-default);
64+
--highlight-color-tip: #1a4a5c;
65+
--highlight-color-inofficial: #2a2d30;
66+
--highlight-color-important: #4a2a1a;
67+
--border: 0.1rem solid #3d444d;
68+
--outline-focus-indicator: #2e9acb;
69+
}
6470
}

assets/sass/button.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@
2020
}
2121

2222
@include focus-indicator(0.2rem);
23+
24+
@media print {
25+
padding: 0.6rem;
26+
display: block;
27+
}
2328
}

assets/sass/expander.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
justify-content: space-between;
1212
border-radius: var(--border-radius-m);
1313

14+
@media print {
15+
padding: 0.6rem;
16+
}
17+
1418
&:not(.o-expander__summary--booking) {
1519
font-weight: 700;
1620
}
@@ -46,6 +50,10 @@
4650
.o-expander__content {
4751
padding: 1.2rem;
4852

53+
@media print {
54+
padding: 0.6rem;
55+
}
56+
4957
// Remove margins from last elements of expander (up to 3 levels deep)
5058
& > *:last-child,
5159
& > *:last-child > *:last-child,

assets/sass/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ body {
1414

1515
@media print {
1616
print-color-adjust: exact;
17+
color: black;
1718
font-size: 1.4em;
1819
}
1920
}

assets/sass/textHighlight.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
@media print {
1515
page-break-inside: avoid;
16+
padding: 0.6rem;
1617
}
1718
}
1819

0 commit comments

Comments
 (0)