Add @reference "…"#15565
Merged
Merged
Conversation
8c79408 to
ec2f9c6
Compare
| await expect( | ||
| run( | ||
| css` | ||
| @reference './foo/bar.css'; |
Contributor
There was a problem hiding this comment.
Need to add support for this to IntelliSense. I've made a note to do that.
thecrypticace
approved these changes
Jan 7, 2025
ec2f9c6 to
60f4ddf
Compare
60f4ddf to
e923bd4
Compare
|
Nice one. I am using scss for all my project and the @import "...";is deprecated in Thanks for the great Job 👍 |
10 tasks
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
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 PR adds a new
@reference "…"API as an replacement for the previously added@import "…" reference. The motivation for a distinct at rule is that@importis already handled outside of Tailwind in some scenarios (e.g. when using in combination with postcss-import, other pre-processors, or frameworks like Svelte). While our implementation of hijacking themediaattribute works in this cases, it can cause annoying linter issues because tooling build around@importdoes not know about our behavior.To fix this, we've decided to move this mode into a separate at rule that is passed-through in the other tooling. Here's an example of how this would look like in Svelte:
With this change, the Svelte linter would not be detecting unused CSS from the
theme.cssfile as it would if we'd rely on@import.