Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(radio/checkbox): show background-color in print stylesheet (#22298) #22299

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(material/checkbox): show background-color in print stylesheet (#…
…22298)

* added color-adjust for checkbox background-color
  • Loading branch information
felhag committed Mar 23, 2021
commit e7ea031551496a93b5fe1aa28a8bbed89d3047d5
4 changes: 4 additions & 0 deletions src/material/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we'll need the same fixes for the mdc-radio and mdc-checkbox.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I open a new pr/issue in the MDC repository or update the material/experimental mdc components in this pull request?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to fix it on our end for now. If MDC ends up resolving it on their end, we can remove our workaround.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an additional commit for the mdc-checkbox. The mdc-radio was printed fine because it uses a border for the inner circle.

._mat-animation-noopable & {
transition: none;
}
Expand Down