Skip to content
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

Throw when layer(…) in @import is in the incorrect spot #15109

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Nov 22, 2024

This PR throws an error when we notice that an layer(…) in an @import or @media is incorrect.

This hints the user to ensure that layer(…) in an @import should be the first condition. In case of an @media, it should be an @layer … instead.

@RobinMalfait RobinMalfait requested a review from a team as a code owner November 22, 2024 15:26
CHANGELOG.md Outdated Show resolved Hide resolved
packages/tailwindcss/src/index.ts Outdated Show resolved Hide resolved
packages/tailwindcss/src/index.ts Outdated Show resolved Hide resolved
@RobinMalfait RobinMalfait force-pushed the feat/warn-when-invalid-layer-is-found branch from 54a8d3f to 7456de2 Compare November 22, 2024 16:11
@RobinMalfait RobinMalfait force-pushed the feat/warn-when-invalid-layer-is-found branch from c6e0940 to 9855d12 Compare November 22, 2024 16:26
RobinMalfait and others added 5 commits November 22, 2024 17:26
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
If any of the errors occur, we can bail and keep the `@import` in the
final CSS.

If something went wrong, the browser will let you know that something is
missing.
@RobinMalfait RobinMalfait force-pushed the feat/warn-when-invalid-layer-is-found branch from 9855d12 to 9b2e98f Compare November 22, 2024 16:26
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
RobinMalfait and others added 2 commits November 22, 2024 22:14
@RobinMalfait RobinMalfait enabled auto-merge (squash) November 27, 2024 11:27
@RobinMalfait RobinMalfait merged commit 6aac3cb into next Nov 27, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the feat/warn-when-invalid-layer-is-found branch November 27, 2024 11:33
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