-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 expose used CSS variables #16211
Merged
Merged
Changes from 36 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
7ebc4ed
track if CSS variable is used
RobinMalfait 87de2a5
move `:root` population to `build(…)` step
RobinMalfait 3472e7c
do not emit unused theme variables
RobinMalfait 44367e5
update tests
RobinMalfait b777ba3
mark variables as used when used in your CSS
RobinMalfait ad68639
update tests
RobinMalfait b3b693f
do not mark CSS variables in `@utility` and `@custom-variant` as used
RobinMalfait 1d6d4fa
add method to track CSS variables in an AST
RobinMalfait 470f493
update tests
RobinMalfait a285222
fast path: only scan if `var()` is used in the raw candidate
RobinMalfait 5b7f315
add failing tests for `@utility`
RobinMalfait 2e88937
track CSS variables in `@utility`
RobinMalfait 2f2faa0
add Oxide tests to ensure we find CSS variables
RobinMalfait 7e61d5e
add integration test
RobinMalfait 34f16e4
emit CSS variables when new CSS variables are found
RobinMalfait bdfbaeb
only emit `--foo-bar` if preceded by `var(`
RobinMalfait 9212ca2
run cargo clippy
RobinMalfait fc736a1
use `fs.expectFileToContain`
RobinMalfait 5b2f975
implement different approach
RobinMalfait 9b1920e
update tests to reflect changes
RobinMalfait 34a1fac
handle escaped CSS variables
RobinMalfait d29bb7f
update tests
RobinMalfait 60335d0
improve ValueParser, handle escaped characters
RobinMalfait 4cc3ab2
cleanup unnecessary code
RobinMalfait e5a7071
cleanup unnecessary check
RobinMalfait 07a20b9
cache tracking of variables
RobinMalfait 8748021
detect all variables that start with `--`
RobinMalfait 63f3917
update changelog
RobinMalfait 64ddc5f
rename `USED` to `STATIC`
RobinMalfait da33751
allow `theme(static)`
RobinMalfait 1420e9f
add test for `@theme static`
RobinMalfait 8f3eb8a
allow accessing `context` in the `optimizeAst` step
RobinMalfait 2e7c8dc
track usage of `@keyframes`
RobinMalfait 64cd24a
remove unnecessary logic
RobinMalfait 557406b
reflect removal of unused `@keyframes` in tests
RobinMalfait f3439f3
update CHANGELOG
RobinMalfait b735291
remove unnecessary check
RobinMalfait dc7aee8
add test for `@theme static`
RobinMalfait a00210a
Test that non-theme keyframes are always preserved
adamwathan 7cd2443
improve naming
RobinMalfait b132705
move tracking of variables up
RobinMalfait bf428dd
keep `static` and `used` separate
RobinMalfait 680d72d
remove unnecessary code
RobinMalfait aafc1d6
remove unnecessary reset
RobinMalfait 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 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't really need this line in the code since you're not importing from
tailwindcss
right?