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

Only add ! to selector class matching template candidate #7664

Merged
merged 2 commits into from Feb 25, 2022

Commits on Feb 25, 2022

  1. Only add ! to selector class matching template candidate

    Fixes #7226.
    
    Before this PR, if you had a class like:
    
    ```css
    .one .two {
      background: black
    }
    ```
    
    ...and then used `!one` in your template, the generated CSS would be this:
    
    ```css
    .\!one .\!two {
      background: black !important
    }
    ```
    
    This would cause the styles to not be applied unless you also added `!` to the beginning of other classes in the template that are part of this selector.
    
    This PR makes sure that other classes in the selector aren't mistakenly prefixed with `!`, so that you can add `!` to only one of the classes in your template and get the expected result.
    adamwathan committed Feb 25, 2022
    Copy the full SHA
    4803b9a View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG

    adamwathan committed Feb 25, 2022
    Copy the full SHA
    ab5ff09 View commit details
    Browse the repository at this point in the history