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

Hover style doesn't work with @media (hover: hover) #75

Open
Znegl opened this issue Dec 11, 2023 · 1 comment
Open

Hover style doesn't work with @media (hover: hover) #75

Znegl opened this issue Dec 11, 2023 · 1 comment

Comments

@Znegl
Copy link

Znegl commented Dec 11, 2023

Describe the bug
When wrapping :hover style in the media query @media (hover: hover) in the component stylesheet, the plugin doesn't apply it.

To Reproduce
Steps to reproduce the behavior:

  1. Create a component with something like the following style in it:
.some-component {
  color: blue;

  @media (hover: hover) {
    &:hover {
      color: red;
    }
  }
}
  1. Run Storybook
  2. Try setting the hover-state using the psudo state plugin
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.
I would expect the defined hover style to be applied.

Screenshots

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 119

Additional context
The plugin works as expected when I remove the media query, but introduces hover bugs for users of touch devices instead.

@philippone
Copy link
Member

Hi @Znegl ,

which version of Postcss Pseudo Classes are you using?

I added a test in my forked version and it seems to be working.

Could you test it with this version:
npm install "https://github.com/philippone/postcss-pseudo-classes#master" --save-dev

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

2 participants