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

Pseudo states aren't applied when using certain CSS pseudo class selectors #125

Open
theetrain opened this issue Aug 29, 2024 · 0 comments

Comments

@theetrain
Copy link

theetrain commented Aug 29, 2024

Problem

Given this element style:

main-container:is(:hover, :focus) .tooltip {
  opacity: 1;
}

Writing a story that activates hover or focus styles do not apply.

<Story
  name="Tooltip Component Hover"
  parameters={{ pseudo: { hover: true } }}
/>

Workaround

Avoid using :is() and :where() when it involves :hover, :focus, and other desirable pseudo states.

-main-container:is(:hover, :focus) .tooltip {
+main-container:hover .tooltip,
+main-container:focus .tooltip, {
  opacity: 1;
}

Possibly relates to #99, #88, and other tickets that relate to pseudo states not applying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant