-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Better contrast for current item in light dropdown #6672
Conversation
With the dark theme on the horizon, I start to wonder if we should move to certain purpose-driven variables instead of those color values. |
Like another layer in between: |
Probably even less color dependent. I'm not sure how verbose we need to be, but if we think about variables that could stick around with any design change, we would probably need something like
Super unsure about primary and secondary, but we need some sort of description for the dark/white dropdowns that are also independent from the current theme. |
What would primary and what would secondary be? |
The naming really isn't great. Dark & light make a lot more sense in general, but when we flip it in the dark theme, we can't also flip the wording. That's where it gets messy. I think "primary" would probably be the dark ones, because they are the common ones and light would be "secondary". But maybe it could also be something like:
|
@bastianallgeier I get your approach but we have that in so many places (e.g. |
You are right. To change the variable system would be way too much for this PR. What about going for the darker color, which is also our default link color, but at the same time we introduce some active icon for dropdowns? I think @nilshoerrmann suggested this somewhere and it would definitely be the most accessible solution – independent from our color choice and the independent from the theme. |
Anything that makes the current state obvious without relying on colours would be great. Either a different font weight or a selected state icon would be great 👍 I think I'd prefer the icon because it's a common thing people know and because it doesn't have side effects like changing text widths. |
Having a something like a checkmark would also help distinguish the focus from the selected state. I personally always think the focussed element is selected, even while seeing the colours. |
@bastianallgeier I think this is great, approved :) |
Just to get that right: |
4.5.0 yes |
Description
Summary of changes
Reasoning
Using
color-blue-700
is actually not fully compliant with WCAG AA, only achieving 4.43:1 contrast ratio.However the next available color step
color-blue-800
is way too dark to be a noticeable difference:How do we want to deal with such situations. Break out of our color system?
#2A78C6
would be conforming and close tocolor-blue-700
.