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-media false positive #36

Closed
crstauf opened this issue Apr 16, 2024 · 3 comments
Closed

hover-media false positive #36

crstauf opened this issue Apr 16, 2024 · 3 comments

Comments

@crstauf
Copy link

crstauf commented Apr 16, 2024

Describe the bug
With the following code, Stylelint throws a false positive on the hover-media rule:

web-component-name {

	&:defined {

		@media ( hover: hover ) {

			details:not( [open] ) {
				position: relative;
				z-index: 1;

				&::before {
					content: '';
					position: absolute;
					top: 0;
					left: 0;
					z-index: -1;
					width: 100%;
					height: 100%;
					background-color: #EFEFF0;
					transition: opacity 0.2s;
					opacity: 0;
				}

				&:hover::before {
					opacity: 1;
				}

			}

		}

	}

}

To Reproduce
Steps to reproduce the behavior:

  1. Add above code to an SCSS file
  2. Run Stylelint on SCSS files

Expected behavior
No warning.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS 14.3.1
@yuschick
Copy link
Owner

Thanks for sharing the code sample. I will take a look 👍

@yuschick
Copy link
Owner

yuschick commented May 2, 2024

I just published a new version, 1.0.4, which has this fixed. Sorry for the delay on this, but thanks again for reporting.

@yuschick yuschick closed this as completed May 2, 2024
@crstauf
Copy link
Author

crstauf commented May 2, 2024

Confirmed; thanks!

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