-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[theme] Add var for webkit autofill color on input components #47472
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
base: master
Are you sure you want to change the base?
[theme] Add var for webkit autofill color on input components #47472
Conversation
Netlify deploy previewhttps://deploy-preview-47472--material-ui.netlify.app/ Bundle size report
|
4f880ef to
d5bbc66
Compare
| setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)'); | ||
| setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)'); | ||
| setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)'); | ||
| setColor(palette.FilledInput, 'autofillWebkitShadowBox', 'unset'); |
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.
| setColor(palette.FilledInput, 'autofillWebkitShadowBox', 'unset'); | |
| setColor(palette.Input, 'autofillWebkitShadowBox', 'unset'); |
I think it makes more sense to share the token between FillInput and OutlinedInput.
An app likely has consistent autofill styles.
| borderTopRightRadius: 'inherit', | ||
| }, | ||
| }), | ||
| ...(theme.vars && { |
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.
please don't change the logic for non theme.vars.
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've changed the logic back to what it was. I understand I should keep changes to a minimum.
I chose to rewrite the logic to align with how it's done earlier in the file (starting at line 60). If I'm not mistaken that approach (for FilledInputRoot) generates only as much CSS as needed for the current theme. The current logic (for FilledInputInput) generates CSS for both light and dark themes even when only one of them can be in use.
| }, | ||
| [theme.getColorSchemeSelector('dark')]: { | ||
| '&:-webkit-autofill': { | ||
| WebkitBoxShadow: '0 0 0 100px #266798 inset', |
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.
The change should be minimal here with a new token used and for light mode.
siriwatknp
left a comment
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.
Please see my comments
d364e9d to
413af77
Compare
|
@siriwatknp Could you please re-trigger the test-dev builds? Seems like a resource issue that caused the failure, not an issue with my changes :) |
Fixes #44665