Skip to content

:focus-visible doesn't seem to work on md-buttons #5648

Answered by asyncLiz
zremboldt asked this question in Q&A
Discussion options

You must be logged in to vote

Hm, I think this might be a bigger shadow dom problem. It doesn't look like :host(:focus-visible) matches when the inner element matches it. Here's a repro: https://lit.dev/playground/#gist=4b7609b02c8d57905ba9c23910a39453

As an aside, what's your use case for styling :focus-visible? The button's focus ring provides a primary color outline around the element that does what you're describing.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zremboldt
Comment options

@asyncLiz
Comment options

Answer selected by zremboldt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants