Skip to content

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

Merged
RobinMalfait merged 8 commits into
nextfrom
feat/warn-when-invalid-layer-is-found
Nov 27, 2024
Merged

Throw when layer(…) in @import is in the incorrect spot#15109
RobinMalfait merged 8 commits into
nextfrom
feat/warn-when-invalid-layer-is-found

Conversation

@RobinMalfait

@RobinMalfait RobinMalfait commented Nov 22, 2024

Copy link
Copy Markdown
Member

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
Comment thread CHANGELOG.md Outdated
Comment thread packages/tailwindcss/src/index.ts Outdated
Comment thread packages/tailwindcss/src/index.ts Outdated
@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
Comment thread CHANGELOG.md
Comment thread CHANGELOG.md
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
@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