From c94b48fb7cbbd7521471b934b1e5dd6983627cda Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 19 Nov 2021 09:33:46 +0100 Subject: Added print style --- assets/css/_vars.scss | 22 ++++++++++++++++++++++ assets/css/components/_card-list.scss | 4 ++++ assets/css/components/_card.scss | 4 ++++ assets/css/components/_footer.scss | 4 ++++ assets/css/components/_header.scss | 4 ++++ assets/css/scopes/_body.scss | 4 ++++ assets/css/style.scss | 5 +++++ 7 files changed, 47 insertions(+) diff --git a/assets/css/_vars.scss b/assets/css/_vars.scss index d029d7f..47ca599 100644 --- a/assets/css/_vars.scss +++ b/assets/css/_vars.scss @@ -160,6 +160,28 @@ $content--width: 46rem; ), 'light'); } +@include iro-execute { + $white: #fff; + $black: #000; + + @include store(( + --colors: ( + --bg-hi: $white, // Darker background + --bg: $white, // Background + --bg-lo: $black, // Lighter background + + --obj-hi: $black, + --obj: $black, + + --fg-hi: $black, // Faint text + --fg: $black, // Text + --fg-lo: $black, // Strong text + + --obj-shadow: transparent, + ), + ), 'print'); +} + @each $breakpoint in map-keys($breakpoints) { @include media('<=#{$breakpoint}') { @include store(( diff --git a/assets/css/components/_card-list.scss b/assets/css/components/_card-list.scss index 7455193..24a04b2 100644 --- a/assets/css/components/_card-list.scss +++ b/assets/css/components/_card-list.scss @@ -60,6 +60,10 @@ } } } + + @media print { + filter: none; + } } @include element('card') { diff --git a/assets/css/components/_card.scss b/assets/css/components/_card.scss index a6a4c98..9a2455b 100644 --- a/assets/css/components/_card.scss +++ b/assets/css/components/_card.scss @@ -128,5 +128,9 @@ } } } + + @media print { + border: 2px solid currentColor; + } } } diff --git a/assets/css/components/_footer.scss b/assets/css/components/_footer.scss index 7106be2..6b483ca 100644 --- a/assets/css/components/_footer.scss +++ b/assets/css/components/_footer.scss @@ -31,5 +31,9 @@ overflow: visible; transform: translateX(-50%); } + + @media print { + display: none; + } } } diff --git a/assets/css/components/_header.scss b/assets/css/components/_header.scss index 1470bea..15fa5a1 100644 --- a/assets/css/components/_header.scss +++ b/assets/css/components/_header.scss @@ -76,5 +76,9 @@ top: 2px; margin-bottom: calc(-.75 * #{prop(--dims --height)}); } + + @media print { + display: none; + } } } diff --git a/assets/css/scopes/_body.scss b/assets/css/scopes/_body.scss index 8b916aa..f5456c0 100644 --- a/assets/css/scopes/_body.scss +++ b/assets/css/scopes/_body.scss @@ -89,6 +89,10 @@ background-color: transparent; color: currentColor; } + + @media print { + border: 2px solid currentColor; + } } } } diff --git a/assets/css/style.scss b/assets/css/style.scss index 8068b87..67f44ed 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -36,4 +36,9 @@ @media (prefers-color-scheme: light) { @include assign('light'); } + + @media print { + @include assign('light'); + @include assign('print'); + } } -- cgit v1.2.3-70-g09d2