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

Always add layer(…) as the first param to @import #15102

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Nov 22, 2024

This PR ensures that when we inject layer(…) into an @import that it always gets inserted as the first param. The layer(…) has to come first by spec.

Input:

@import "./foo" supports(--foo);

Before:

@import "./foo" supports(--foo) layer(utilities);

After:

@import "./foo" layer(utilities) supports(--foo);

@RobinMalfait RobinMalfait requested a review from a team as a code owner November 22, 2024 14:00
@RobinMalfait RobinMalfait force-pushed the feat/ensure-layers-come-first branch from 974fa56 to ed60a68 Compare November 22, 2024 14:01
@RobinMalfait RobinMalfait force-pushed the feat/ensure-layers-come-first branch from ed60a68 to 2e98679 Compare November 22, 2024 14:02
@RobinMalfait RobinMalfait enabled auto-merge (squash) November 22, 2024 14:07
@RobinMalfait RobinMalfait merged commit dd2058d into next Nov 22, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the feat/ensure-layers-come-first branch November 22, 2024 14:09
adamwathan pushed a commit that referenced this pull request Nov 22, 2024
This PR ensures that when we inject `layer(…)` into an `@import` that it
always gets inserted as the first param. The `layer(…)` has to come
first by spec.

Input:
```css
@import "./foo" supports(--foo);
```

Before:
```css
@import "./foo" supports(--foo) layer(utilities);
```

After:
```css
@import "./foo" layer(utilities) supports(--foo);
```
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.

3 participants