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;
/* https://color.adobe.com/create/color-contrast-analyzer */
/*dark theme*/
@layer baseline{
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #1c1b19;
@ -50,6 +51,7 @@
--blockquote-bg: #fff;
}
}
}
@layer baseline{
body {
background: var(--bg-color);
@ -92,3 +94,13 @@ pre:has( > code) {
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? */
@media print {
@layer print{
#header {
@layer print{
#header {
visibility: hidden;
}
#content {
border-style: none;
}
pre {
page-break-inside: avoid;
}
}
}
#content {
border-style: none;
}
pre {
page-break-inside: avoid;
}
}
}