Skip to content

Allow media queries nested in pseudo element selectors #4177

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EECOLOR
Copy link

@EECOLOR EECOLOR commented May 8, 2025

Fixes: #4164

Please note that I used AI to create the solution. From what I can tell from my limited understanding of Go this solution makes sense. What I can not determine:

  • Is the function I added the best way of achieving this result?
  • Is this in line with your style of writing Go?
  • Should the function be in that specific file?
  • Did I miss any test cases for subtle interaction with other features?

This change fixes the following use case:

input

a {
  &::before {
    @media screen {
      ...
    }
  }
}

before

@media screen {
  {
    ...
  }
}

after

@media screen {
  &::before {
    ...
  }
}

@EECOLOR
Copy link
Author

EECOLOR commented May 27, 2025

@evanw Any chance you can review this?

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

Successfully merging this pull request may close these issues.

Nested @media transformed incorrectly for pseudo elements
1 participant