-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(textfield): add separate classes for leading/trailing icons #5367
Conversation
All 728 screenshot tests passed for commit 2167ee0 vs. |
Codecov Report
@@ Coverage Diff @@
## master #5367 +/- ##
==========================================
+ Coverage 97.22% 98.66% +1.43%
==========================================
Files 164 163 -1
Lines 6267 6281 +14
Branches 834 850 +16
==========================================
+ Hits 6093 6197 +104
+ Misses 174 84 -90
Continue to review full report at Codecov.
|
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.
Overall comment: let's leave the mdc-text-field__icon
element class on the icons but add the mdc-text-field__icon--trailing
or mdc-text-field__icon--leading
modifier classes. It'll allow us to keep generalized behavior but also apply variant-specific behavior where necessary.
@patrickrodee does that make sense for the long term though? A lot of the shared styles right now have to deal with absolute positioning, which will go away. In the end the only shared styles will be for the cursor and scaling with density. It's still a breaking change since we need the leading/trailing modifiers, and it feels like an unnecessary class to me at that point. |
Would we want to do something similar for prefix/suffix? <span class="mdc-text-field__affix mdc-text-field__affix-prefix">$</span> |
@asyncLiz Yeah, something similar with prefix/suffix would be a good idea. |
All 728 screenshot tests passed for commit dc81574 vs. |
All 728 screenshot tests passed for commit 3bf0ec9 vs. |
119febc
to
41d5d91
Compare
All 698 screenshot tests passed for commit 41d5d91 vs. |
357049e
to
5dbfcc3
Compare
All 704 screenshot tests passed for commit 5dbfcc3 vs. |
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.
🔥
@asyncLiz nit: |
BREAKING_CHANGE: icons must use `.mdc-text-field__leading-icon` or `.mdc-text-field__trailing-icon` classes. `mdc-text-field-icon-color()` mixin has been split into `mdc-text-field-leading-icon-color()` and `mdc-text-field-trailing-icon-color()`.
5dbfcc3
to
1988a4a
Compare
All 602 screenshot tests passed for commit 1988a4a vs. |
…r leading/trailing icons PR: go/mdc-web-pull/5367 Description: BREAKING_CHANGE: icons must use `.mdc-text-field__icon--leading` or `.mdc-text-field__icon--trailing` classes. `mdc-text-field-icon-color()` mixin has been split into `mdc-text-field-leading-icon-color()` and `mdc-text-field-trailing-icon-color()`. Tested: https://test.corp.google.com/ui#id=OCL:287554248:BASE:288701267:1578500687772:eaf3ab49 COPYBARA_INTEGRATE_REVIEW=material-components/material-components-web#5367 from material-components:fix/textfield/leading-trailing-icon-classes 3bf0ec97cba823052241450b65ae1edb3af18963 PiperOrigin-RevId: 288741151
All 602 screenshot tests passed for commit a3c5534 vs. |
All 602 screenshot tests passed for commit e761a87 vs. |
BREAKING_CHANGE: icons must use
.mdc-text-field__leading-icon
or.mdc-text-field__trailing-icon
classes.mdc-text-field-icon-color()
mixin has been split intomdc-text-field-leading-icon-color()
andmdc-text-field-trailing-icon-color()
.