From 4b59e1b63945b1e91c6245b5acc1fc88670b375b Mon Sep 17 00:00:00 2001 From: Felix Hagemans Date: Sat, 20 Mar 2021 10:53:43 +0100 Subject: [PATCH 1/3] feat(material/radio): show background-color in print stylesheet (#22298) * added color-adjust for radio background-color --- src/material/radio/radio.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/material/radio/radio.scss b/src/material/radio/radio.scss index 97a05dd9d758..16955de9a60a 100644 --- a/src/material/radio/radio.scss +++ b/src/material/radio/radio.scss @@ -80,6 +80,10 @@ $ripple-radius: 20px; // IE to flash the entire circle for a couple of frames, throwing off the entire animation. transform: scale(0.001); + // force browser to show background-color when using the print function + -webkit-print-color-adjust: exact; + color-adjust: exact; + ._mat-animation-noopable & { transition: none; } From e7ea031551496a93b5fe1aa28a8bbed89d3047d5 Mon Sep 17 00:00:00 2001 From: Felix Hagemans Date: Tue, 23 Mar 2021 19:46:26 +0100 Subject: [PATCH 2/3] feat(material/checkbox): show background-color in print stylesheet (#22298) * added color-adjust for checkbox background-color --- src/material/checkbox/checkbox.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/material/checkbox/checkbox.scss b/src/material/checkbox/checkbox.scss index 6b4ed62337bb..7e76380cb243 100644 --- a/src/material/checkbox/checkbox.scss +++ b/src/material/checkbox/checkbox.scss @@ -288,6 +288,10 @@ $_mat-checkbox-mark-stroke-size: 2 / 15 * checkbox-common.$size !default; variables.$linear-out-slow-in-timing-function, opacity checkbox-common.$transition-duration variables.$linear-out-slow-in-timing-function; + // force browser to show background-color when using the print function + -webkit-print-color-adjust: exact; + color-adjust: exact; + ._mat-animation-noopable & { transition: none; } From f0c910c9dd93d11579e60d123fe44c20445f75cf Mon Sep 17 00:00:00 2001 From: Felix Hagemans Date: Thu, 25 Mar 2021 21:55:13 +0100 Subject: [PATCH 3/3] feat(material-experimental/mdc-checkbox): show background-color in print stylesheet (#22298) * added color-adjust for checkbox background-color --- src/material-experimental/mdc-checkbox/checkbox.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/material-experimental/mdc-checkbox/checkbox.scss b/src/material-experimental/mdc-checkbox/checkbox.scss index 03c0cb562726..c9907a59a58c 100644 --- a/src/material-experimental/mdc-checkbox/checkbox.scss +++ b/src/material-experimental/mdc-checkbox/checkbox.scss @@ -44,6 +44,13 @@ } } + + .mdc-checkbox__background { + // force browser to show background-color when using the print function + -webkit-print-color-adjust: exact; + color-adjust: exact; + } + // Angular Material supports disabling all animations when NoopAnimationsModule is imported. // TODO(mmalerba): Look into using MDC's Sass queries to separate the animation styles and // conditionally add them. Consider the size cost when deciding whether to switch.