Fix print styles for navbar, dark mode, cards and tables; document printing (#2897)

This commit is contained in:
Bartosz-Do
2026-08-17 18:45:17 +02:00
committed by GitHub
parent 204b6c594a
commit f5f75d4db6
8 changed files with 149 additions and 0 deletions
+11
View File
@@ -48,4 +48,15 @@
// The global `@extend [data-bs-theme='dark']` for light-scoped subtrees
// inside a dark body lives in `_extends.scss` — with the module system it
// must have every dark-styling module upstream.
// Printing a dark page wastes ink/toner and can leave near-white text on
// paper, since browsers skip background colors in print by default. Force
// every light-dark() token back to its light value regardless of theme.
@include media-print() {
:root,
[data-bs-theme='dark'],
[data-theme='dark'] {
color-scheme: light !important;
}
}
}
+11
View File
@@ -97,6 +97,10 @@ Navbar
background: var(--navbar-bg);
box-shadow: inset 0 calc(-1 * var(--navbar-border-width)) 0 0 var(--navbar-border-color);
@include media-print() {
display: none;
}
.navbar-collapse & {
flex-grow: 1;
}
@@ -391,6 +395,13 @@ Navbar vertical
}
}
}
@include media-print() {
.navbar-vertical ~ .page {
padding-inline-start: 0;
padding-inline-end: 0;
}
}
}
.navbar-overlap {
+1
View File
@@ -24,6 +24,7 @@
@include media-print() {
border: none;
box-shadow: none;
break-inside: avoid;
}
@at-root a#{&} {
+10
View File
@@ -3,6 +3,16 @@
.table {
font: inherit;
@include media-print() {
thead {
display: table-header-group;
}
tr {
break-inside: avoid;
}
}
thead {
th {
padding-top: $table-th-padding-y;