-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(textfield): add primary color to textfield label on focus #1820
fix(textfield): add primary color to textfield label on focus #1820
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1820 +/- ##
=======================================
Coverage 99.43% 99.43%
=======================================
Files 84 84
Lines 3718 3718
Branches 486 486
=======================================
Hits 3697 3697
Misses 21 21 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.
I actually think we can accomplish the same thing using sibling selectors without having to touch the adapter or foundation. E.g.:
.mdc-text-field__input:focus ~ .mdc-text-field__label
ea39e02
to
ac48a2e
Compare
@amsheehan |
09ffccb
to
bef7e54
Compare
@@ -237,7 +241,6 @@ | |||
position: absolute; | |||
bottom: 20px; | |||
width: calc(100% - #{$mdc-text-field-icon-padding}); | |||
color: $mdc-text-field-box-secondary-text; |
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 this line need to be removed? It doesn't appear to be related to the :focused
state.
Also, it looks like $mdc-text-field-box-secondary-text
isn't used anywhere else, so if we really do need to remove this line, we should also delete the variable from _variables.scss
.
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 default color
property is set in the mdc-text-field-label.scss
file. My idea was to let the label scss file determine the default values, and then override them when we need to change them based on interaction with the other elements in the mdc-text-field.scss
file.
@@ -246,10 +249,6 @@ | |||
// when the ripple is activated behind it. | |||
will-change: transform; | |||
|
|||
@include mdc-theme-dark(".mdc-text-field") { |
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 do these lines need to be removed? They don't appear to be related to the :focused
state.
bd8eb5e
to
a894da4
Compare
a894da4
to
ea3d67e
Compare
ea3d67e
to
0812f04
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.
Can we use the new Sass color mixins here?
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
fixes: #1435