-
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
feat(text-field): Add ripple to outlined text field #1807
Changes from 17 commits
d09deea
c97e81b
b15172e
8cc9ae1
b491f77
07bac11
855dacd
771d0ac
341329c
7be08de
1250a18
b12d5c2
a4a7009
ac8d407
4821f39
8772351
ded1572
a0292e5
f4292f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,10 @@ | |
} | ||
|
||
.mdc-text-field__outline { | ||
@include mdc-ripple-surface; | ||
@include mdc-ripple-radius; | ||
@include mdc-states-base-color(text-primary-on-light); | ||
@include mdc-states-press-opacity(0.12); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should reference Also, we should probably include styles for dark mode passing (There's no dark mode toggle under the outlined text field example at the moment either; should we add one?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call. I plan on adding dark mode along with dense mode to the PR for adding leading/trailing icons. |
||
@include mdc-theme-prop(color, primary); | ||
@include mdc-text-field-outlined-corner-radius($mdc-text-field-border-radius); | ||
|
||
|
@@ -44,17 +48,18 @@ | |
transition: mdc-text-field-transition(opacity); | ||
opacity: 0; | ||
z-index: 2; | ||
overflow: hidden; | ||
|
||
svg { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
|
||
.mdc-text-field__outline-path { | ||
@include mdc-theme-prop(stroke, primary); | ||
|
||
stroke-width: 2px; | ||
transition: mdc-text-field-transition(stroke-width), mdc-text-field-transition(opacity); | ||
stroke: $mdc-text-field-outlined-idle-border; | ||
stroke-width: 1px; | ||
transition: mdc-text-field-transition(stroke), mdc-text-field-transition(stroke-width), | ||
mdc-text-field-transition(opacity); | ||
fill: transparent; | ||
} | ||
} | ||
|
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.
Nit: Move this above
mdc-states
, belowmdc-ripple-surface