-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add support for defining simple custom utilities in CSS via @utility
#14044
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
e402729
Add support for custom static utilities with @utility
adamwathan 71b800b
Add sorting test
thecrypticace 5e19f4d
Add support for custom functional utilities
thecrypticace 63b4baf
Build small AST for custom utility definitions
thecrypticace 800acd4
Allow custom utilities to support arbitrary values
thecrypticace b22cd97
Allow custom utilities to support negative candidates
thecrypticace 4cd6b74
Rework parsing
thecrypticace f219ba9
Only allow defining static utilities in CSS
thecrypticace 3a05b4b
Work on addUtilities API
thecrypticace 185e587
Allow static utilities to have `/` in them
thecrypticace a2ee558
Make regex a bit more strict
thecrypticace 404cd00
Support negative static utilities
thecrypticace b5dc82b
Drop custom utilities using `-*` in their name
thecrypticace f1b43d3
Allow re-defining utilities
thecrypticace 88a8c2d
Split utilities into separate lists
thecrypticace a703b0c
wip
thecrypticace c93ac30
Make `@utility` names and definition more strict
thecrypticace 2f51d8b
Reorganize tests
thecrypticace 44c39b3
wip
thecrypticace 150ab7f
Update changelog
thecrypticace 3824037
Tweak wording a bit
thecrypticace ea01b55
Compile utility name regex once
thecrypticace bb54ecb
Clone nodes before use in custom utilities
thecrypticace e0baf26
Update packages/tailwindcss/src/index.ts
thecrypticace 83a5a9a
Update packages/tailwindcss/src/index.ts
thecrypticace 211d30f
wip
thecrypticace 63a834a
Fix linting error
thecrypticace 28edd52
Add tests
thecrypticace 02af66d
Remove comment
thecrypticace 4b2ec5d
Optimize implementation of `keys()`
thecrypticace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.