How can we change the select current option without using css variables? #2042
royeradames
started this conversation in
General
Replies: 2 comments 3 replies
-
I would had expected this to work but it doesn't. sl-option::part(base).option--current {
background-color: white;
color: mediumpurple;
}
sl-option::part(base).option--current:hover {
background-color: grey;
} Not being able to fully customize it and having to deal with this big learning curve is a turn off. |
Beta Was this translation helpful? Give feedback.
0 replies
-
We are missing an aria-current="true" on the sl-option. Like what we have for aria-selected="true" [mdn aria-current](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current_ |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current select option needs to change styles from the blue background and white text to white background to purple text.
We can achieve this by changing the css variables
Now how can we achieve this without changing the css variable. So that we can use tailwind colors define in the config instead of the css variables we have to duplicate.
Originally, I was try tailwind group on the base part and depending if the base part has the option--current I can apply the styles but I got no luck in my part.
If we where able to change the styles base if the class is there or maybe we can add a attribute on the option that let us know that is the current one. We can change the hover styles of the current option.
Beta Was this translation helpful? Give feedback.
All reactions