-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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(button): focus state matches spec #467
Conversation
background-color: md-color($md-foreground, base, 0.12); | ||
@include md-button-theme('background-color', 600); | ||
&.md-button-focus:after { | ||
// The button spec calls for focus on rasied buttons (and FABs) to be indicated with a |
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.
typo: rasied => raised
bottom: 0; | ||
right: 0; | ||
content: ''; | ||
background-color: rgba(black, 0.12); |
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.
Probably want to include pointer-events: none
. Not sure if it's fully necessary in our use-case, but it's possibly that the pseudo element can intercept click events without it.
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.
This color should be able to be picked from $md-foreground
with the hue-key divider
? But I see, it was previously already taken from the palettes. Maybe it's intentionally?
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.
According to the spec, this shade should always be black 12% opacity regardless of theme.
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 UX treatments LGTM. However this looks like it only applies to raised buttons. Flat buttons still seem to be styled using background color. Is the intent to style the two types of buttons using different strategies?
@robertmesserle comments addressed |
background-color: md-color($md-accent, 600); | ||
// The focus shading for FABs needs to match the FAB's circular shape. | ||
&.md-button-focus:after { | ||
border-radius: 50%; |
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.
Would it be better to use border-radius: inherit
in the declaration above instead? This way it will also respect the border radii for normal flat + raised buttons.
@kara I followed Travis' advice and unified the focus styles to all be done the same way. Can you take another look? |
LGTM |
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. |
R: @robertmesserle @kara
Also, @traviskaufman, could you verify that I'm interpreting the spec correctly here?
Closes #420