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

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

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
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
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