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

Add dynamic negative value opt-in #5713

Merged
merged 3 commits into from
Oct 6, 2021

Conversation

bradlc
Copy link
Contributor

@bradlc bradlc commented Oct 6, 2021

This PR adds a supportsNegativeValues option for plugins to opt-in to dynamic negative value support. This avoids invalid classes being generated and unwanted classes being returned from the getClassList function.

Plugins that are opted-in:

  • inset
  • zIndex
  • order
  • margin
  • translate
  • rotate
  • skew
  • scrollMargin
  • space
  • textIndent
  • letterSpacing
  • hueRotate
  • backdropHueRotate

@bradlc bradlc merged commit 8ec9497 into dynamic-negative-utilities Oct 6, 2021
@bradlc bradlc deleted the dynamic-negative-classlist branch October 6, 2021 17:14
adamwathan added a commit that referenced this pull request Oct 6, 2021
…5709)

* WIP

* Add failing test for negating default values

* Add dynamic negative value opt-in (#5713)

* Add `supportsNegativeValues` plugin option

* Update `getClassList` to support dynamic negative values

* Add test for using a negative scale value with a plugin that does not support dynamic negative values

* Support dynamic negation of `DEFAULT` values (#5718)

* Add test case

Co-authored-by: Brad Cornes <[email protected]>
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.

1 participant