Couldn't access styling of selected option. #1969
Unanswered
NilsJacobsen
asked this question in
Help
Replies: 1 comment 8 replies
-
This is something we're looking to use custom states for in Web Awesome. For now, you can target the selected option with this: sl-option[aria-selected="true"] {
/* your styles here */
} Does that help in the meantime? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I use the
sl-select
withsl-option
. I export the part base of option, to have access to the styling, but I can only style the normal background color and hover color. Of course there is no way to style the selected state, because I can't use further selectors after I used the part api.This gives me the weird behaviour of overriding the select styles.
Is there a workaround or an other way of doing this?
Thanks, folks :)
Beta Was this translation helpful? Give feedback.
All reactions