-
Notifications
You must be signed in to change notification settings - Fork 652
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
fix(tailwind): User-defined CSS variables being replaced with undefined #1587
Merged
gabrielmfern
merged 7 commits into
canary
from
fix/inexistant-css-variables-replaced-with-undefined
Sep 17, 2024
Merged
fix(tailwind): User-defined CSS variables being replaced with undefined #1587
gabrielmfern
merged 7 commits into
canary
from
fix/inexistant-css-variables-replaced-with-undefined
Sep 17, 2024
Conversation
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 2952971 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
gabrielmfern
force-pushed
the
fix/inexistant-css-variables-replaced-with-undefined
branch
from
August 14, 2024 18:07
ffa7d22
to
385f323
Compare
gabrielmfern
force-pushed
the
fix/inexistant-css-variables-replaced-with-undefined
branch
from
August 19, 2024 16:10
303089b
to
8df8afd
Compare
gabrielmfern
force-pushed
the
fix/inexistant-css-variables-replaced-with-undefined
branch
from
August 30, 2024 13:19
8df8afd
to
9b48c52
Compare
gabrielmfern
force-pushed
the
canary
branch
5 times, most recently
from
September 13, 2024 14:35
92e6dc1
to
76bbf7b
Compare
gabrielmfern
force-pushed
the
fix/inexistant-css-variables-replaced-with-undefined
branch
from
September 16, 2024 15:58
9b48c52
to
2952971
Compare
vcapretz
approved these changes
Sep 17, 2024
gabrielmfern
deleted the
fix/inexistant-css-variables-replaced-with-undefined
branch
September 17, 2024 17:41
gabrielmfern
added a commit
that referenced
this pull request
Sep 20, 2024
Hi, has this been pushed? |
gabrielmfern
added a commit
that referenced
this pull request
Sep 26, 2024
gabrielmfern
added a commit
that referenced
this pull request
Oct 1, 2024
gabrielmfern
added a commit
that referenced
this pull request
Oct 1, 2024
gabrielmfern
added a commit
that referenced
this pull request
Oct 8, 2024
gabrielmfern
added a commit
that referenced
this pull request
Oct 11, 2024
gabrielmfern
added a commit
that referenced
this pull request
Oct 14, 2024
gabrielmfern
added a commit
that referenced
this pull request
Oct 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is meant to address #1448.
The problem there was that, in a nutshell, CSS variables defined in the
template, and then used through Tailwind utilities, would end up being replaced
with just
undefined
.This happens due to the behavior of
postcss-css-variables,
the PostCSS plugin we use internally ourselves to inline Tailwind's CSS
variables. The issue then happens when this library finds a CSS variables that
it can't find a declaration for, making it just
undefined
. This behavior isquestionable together with a few other problems that cause bugs that we need
patches for currently. The library though, does not have any configuration to
allow for us to override this behavior, and patching it would be just too
cumbersome to both maintain and to make in the first place.
With that in mind, this PR removes the use of that dependency and writes in a
new, relatively naive, implementation of a PostCSS plugin that we can maintain
and adjust the behavior of ourselves. It also adds in a few unit tests to
ensure the behavior of this new plugin is equivalent to the old one we used.