]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: prevent/enforce color adjustment according to "$print-transparent-backgrounds" 11565/head
authorNicolas Coden <nicolas@ncoden.fr>
Fri, 26 Oct 2018 19:53:36 +0000 (21:53 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Fri, 26 Oct 2018 19:53:36 +0000 (21:53 +0200)
scss/typography/_print.scss

index 66b681faf206d77dfe006b864dd8d6116721ab1b..22ea8b76d9c8480c3ced5addd56f9db1534429f6 100644 (file)
@@ -15,13 +15,19 @@ $print-hrefs: true !default;
 
   @media print {
     * {
+      // Ensure a "black-on-white" print by removing backgrounds,
+      // using black text everywhere and forcing the browser to economize ink.
       @if $print-transparent-backgrounds {
         background: transparent !important;
         color: black !important; // Black prints faster: h5bp.com/s
+        color-adjust: economy;
+      }
+      // Otherwise, prevent any economy by the browser.
+      @else {
+        color-adjust: exact;
       }
 
       box-shadow: none !important;
-
       text-shadow: none !important;
     }