Skip to content

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?

@bronisMateusz
Copy link

Annoying bug, I also have the same problem in my project, so it would be great to see a fix finally implemented. Thanks @EECOLOR for explaining the source of the problem.

@evanw
Copy link
Owner

evanw commented Oct 30, 2025

I'm closing this because I believe it was fixed by the fix for #4265, which was released in version 0.25.10.

@evanw evanw closed this Oct 30, 2025
@EECOLOR
Copy link
Author

EECOLOR commented Oct 31, 2025

@evanw Thanks! As soon as I have time I will verify it. #4164 has a more complete test case, so if it indeed fixes that problem I will close that ticket as well.

I will let you know if it does not solve the problem.

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

3 participants