Skip to content
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

Currently selected select Elements in Dark Theme have very low contrast #940

Closed
Sarenor opened this issue Feb 8, 2023 · 1 comment · Fixed by #954
Closed

Currently selected select Elements in Dark Theme have very low contrast #940

Sarenor opened this issue Feb 8, 2023 · 1 comment · Fixed by #954
Labels
bug Something isn't working

Comments

@Sarenor
Copy link
Contributor

Sarenor commented Feb 8, 2023

Current Behavior

By default, Selects look pretty good in Dark theme:
image
As soon as an element is actively clicked and selected by the mouse, the color changes to white automatically which leads to very low contrast:
image

I would have thought that something like

	.select option::selection {
		@apply text-surface-50-900-token;
	}

Would fix that but I couldn't get it to work because my CSS-Fu is to weak.

Steps To Reproduce

No response

Anything else?

  1. Go to http://localhost:5173/elements/forms
  2. Make sure your selected theme is in dark mode
  3. Click on a select option
@Sarenor Sarenor added the bug Something isn't working label Feb 8, 2023
@endigo9740
Copy link
Contributor

The issue with this one is it's a hack of sorts to apply the background color to select elements at all - actually using a gradient that fades from two version of the same color. It's not just a normal "background = whatever" situation.

Given this, the only way I can get consistent results seems to be using a primary color, which uses the same text color for either light or dark mode. This provide the desired results - even if it's more opinionated. This will do for now.

Screenshot 2023-02-10 at 11 14 55 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants