-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[core] Force visibility on a few components in ink save print mode #20749
Merged
oliviertassinari
merged 3 commits into
mui:master
from
coktopus:fix/missing-sliders-in-print
Apr 26, 2020
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rather switch to
color-adjust
which is on standard-track? The result should be the same sincejss
should convert this to--webkit-print-color-adjust
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSS supports the auto-prefixing for this property but styled-components and emotion don't. Should we stick to the webkit approach for interoperability support between the engines in v5?
Looking at where the prefixer of sc and emotion are implemented, I could find https://github.com/thysultan/stylis.js/blob/master/src/Prefixer.js. For JSS it's in https://github.com/cssinjs/css-vendor/blob/71dc0fd1bb73d9b1b1da836b3a73bfcc67b3f268/src/plugins/color-adjust.js.
I have opened this issue thysultan/stylis#210.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does it matter what other libraries do? They don't consume these styles, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works with autoprefixer and fixes this behavior in firefox as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eps1lon I think until a property is standardized it should not be implemented. This can cause issues across certain browsers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oliviertassinari it depends. if you use https://github.com/NanoHttpd/nanohttpd in a webview invalid css throws an error and crashes it. ( example for non standard web usages on the css engine )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confused this with invalid css stylesheets. For rules it should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use a bunch of css properties that aren't standardized. This doesn't even apply here because
color-adjust
is standardized while-webkit-print-color-adjust
isn't.color-adjust
just hasn't made it beyond the "editors draft" stage.That is pretty bold of them. They have to stay on top of any property that is being standardized or works in any browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.w3.org/TR/CSS21/syndata.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@j-mendez As a workaround, you can use the
theme.overrides
API to remove this CSS prop. But if your aim in https://www.a11ywatch.com/ is to crawl pages, you will face a concerning issue once crawling external pages (it's the wild west).