Skip to content

Conversation

@philipp-spiess
Copy link
Member

Part-of #14558

After handling @import of stylesheets in core, we can no longer gate out features based on finding a specific sequence in the input CSS, as this string will not contain contents from other stylesheets.

So, consider the following input CSS:

@import "tailwindcsss";
@import "./styles.css";

We can't opt-out of the traversal to search for @apply based on it because it, of course, does not contain the contents of ./styles.css yet.

@philipp-spiess philipp-spiess marked this pull request as ready for review October 3, 2024 12:41
if (css.includes('@apply')) {
substituteAtApply(ast, designSystem)
}
substituteAtApply(ast, designSystem)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a feeling we were going to have to do this eventually

@adamwathan adamwathan force-pushed the fix/at-apply-for-imported-files branch from 2894c2e to 3e0b2c3 Compare October 3, 2024 13:22
@adamwathan adamwathan merged commit aa343a9 into next Oct 3, 2024
@adamwathan adamwathan deleted the fix/at-apply-for-imported-files branch October 3, 2024 13:23
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.

4 participants