made print not use up all your ink

This commit is contained in:
Pagwin 2024-11-02 20:07:54 -04:00
parent 7e270bcf12
commit be9e446b6f
No known key found for this signature in database
GPG key ID: 81137023740CA260
2 changed files with 25 additions and 11 deletions

View file

@ -1,6 +1,7 @@
@layer baseline, print; @layer baseline, print;
/* https://color.adobe.com/create/color-contrast-analyzer */ /* https://color.adobe.com/create/color-contrast-analyzer */
/*dark theme*/ /*dark theme*/
@layer baseline{
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--bg-color: #1c1b19; --bg-color: #1c1b19;
@ -50,6 +51,7 @@
--blockquote-bg: #fff; --blockquote-bg: #fff;
} }
} }
}
@layer baseline{ @layer baseline{
body { body {
background: var(--bg-color); background: var(--bg-color);
@ -92,3 +94,13 @@ pre:has( > code) {
background: var(--blockquote-bg); background: var(--blockquote-bg);
} }
} }
@media print {
@layer print{
:root {
/*trying to avoid accidentally eating the entire printer's ink supply with bg color*/
--bg-color: #FFF;
}
}
}

View file

@ -100,15 +100,17 @@ p {
} }
/* I mean why not? */ /* I mean why not? */
@media print { @media print {
@layer print{ @layer print{
#header {
#header {
visibility: hidden; visibility: hidden;
} }
#content { #content {
border-style: none; border-style: none;
} }
pre { pre {
page-break-inside: avoid; page-break-inside: avoid;
} }
}
}
} }