-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material-experimental/mdc-input): only apply styling when inside a form field #21876
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
Conversation
Caretaker note: this has the potential of breaking existing apps. We should re-evaluate the fix if it affects a lot of g3 targets. |
5df18ab
to
fc105f5
Compare
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.
LGTM
I'll try presubmitting it, if it proves too breaking we could at least try again with just the MDC components. |
broke ~200 targets, lets try just the MDC ones |
@mmalerba if we do end up submitting this with only the MDC version fixed, we'll need to update the docs to mention this difference in behavior. |
Alternatively we could just not do this at all. There's no real reason to use |
I do see the desire to do this specifically for |
Are we sure that the presubmit is due to people using An alternative could be to throw an error if |
I think the main issue is that people are intentionally using it outside the form-field, simply as a way to clear the input styles (background, border, etc) |
fc105f5
to
d502206
Compare
I've changed the PR so it only affects the MDC version of the input. |
cf6df45
to
c3e472a
Compare
c3e472a
to
7c2c448
Compare
7c2c448
to
4a40ac4
Compare
…a form field Currently `mat-form-field` brings in the styles for `MatInput`. but the problem is that they target a class that is applied even to inputs that aren't inside a form field. These changes aim to prevent CSS from bleeding out by only styling inputs inside a `mat-form-field`. Fixes angular#21871.
4a40ac4
to
f03c0ac
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently
mat-form-field
brings in the styles forMatInput
. but the problem is that they target a class that is applied even to inputs that aren't inside a form field.These changes aim to prevent CSS from bleeding out by only styling inputs inside a
mat-form-field
.Fixes #21871.