mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 21:31:28 +04:00
Fix print styles for navbar, dark mode, cards and tables; document printing (#2897)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
@include media-print() {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
@at-root a#{&} {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user