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

Allow variant to be an at-rule without a prelude #11589

Merged
merged 2 commits into from Jul 11, 2023

Conversation

thecrypticace
Copy link
Contributor

Right now you can't define a custom variant for something like @starting-style which has an empty at-rule prelude.

This PR addresses this shortcoming and now defining the following variant no longer errors:

addVariant('starts-with', '@starting-style')

This change will allow you to use a utility like starts-with:underline to produce the following CSS:

@starting-style {
  .starts-with\:underline {
    text-decoration-line: underline;
  }
}

@thecrypticace thecrypticace force-pushed the fix/variant-at-rule-no-prelude branch from 8800221 to 01a4a49 Compare July 11, 2023 19:56
@thecrypticace thecrypticace merged commit 516c149 into master Jul 11, 2023
10 checks passed
@thecrypticace thecrypticace deleted the fix/variant-at-rule-no-prelude branch July 11, 2023 20:04
thecrypticace added a commit that referenced this pull request Jul 13, 2023
* Allow variant to be an at-rule without a prelude

* Update changelog
thecrypticace added a commit that referenced this pull request Jul 13, 2023
* Allow variant to be an at-rule without a prelude

* Update changelog
thecrypticace added a commit that referenced this pull request Jul 13, 2023
* Allow variant to be an at-rule without a prelude

* Update changelog
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.

None yet

1 participant