-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 incorrect focus style size on InputControl #54394
Conversation
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.
Just noting that this PR changes the border color from COLORS.ui.borderFocus
(which is an alias from the 10% darker theme color) to COLORS.theme.accent
(which is the standard theme color)
A few questions:
- Is changing the focused border color from the darker to the normal shade of the accent color on purpose?
- should we also update the value of the
COLORS.ui.borderFocus
variable? - for better consistency, should we also review all other instances where
COLORS.ui.borderFocus
is used in the package, and update those styles if needed?
(cc @jasmussen )
Thank you!
Good questions, I can answer some:
Focus styles across the UI should be pure blueberry (i.e. accent color) and always 1.5px thick. I didn't actually notice that the focus style here was darker, but if it was this corrects an error there.
Probably, yes, in fact there are currently only one or two exceptions to using the pure accent color in the UI, and at the moment all of those are related to lightening the accent color to work on the dark material. This will likely expand a bit in the future as that UI componentry matures a bit, but as a rule of thumb it's almost always the pure colors.
That would be great 🚀 |
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.
Thank you for the explanation. It looks like this PR achieves the desired 1.5px thickness by combining a 1px border with a 0.5px box-shadow — is that the expected "technique" for focus styles that should be applied to all components?
@richtabor would you be able to work on these 2 follow-ups:
Happy to help with reviewing these changes. |
I don't know. I'm approving because the mix of focus styles we have now is very poor, and even a hacky solution is much much preferrable. One nuance is that ideally we also have a consistent border radius; 2px in the resting state, and then a consistent radius for the focused state. Whether that's inwards, outwards, or centered, that we can figure out, but ideally that's the aspect that can be improved in next steps and potentially with consistency across. |
9713dce
to
0e7a6d9
Compare
Sure, I can do that in a follow-up PR today. |
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.
🚀
What?
Fixes incorrect focus style size on InputControl, using the same idea as on #33842.
Why?
Consistency.
Testing Instructions
Screenshots or screencast