Skip to content

fix(issue#4242): add support for layer at-rule #4337

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

puckowski
Copy link
Contributor

What:

Fix for issue #4242 that builds upon #4333 to add support for @layer at-rule.

Why:

The @layer at-rule has 94.47% (https://caniuse.com/mdn-css_at-rules_layer) browser support can support for the at-rule can benefit Less users.

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

* Add support for layer at-rule.
* Add tests for layer at-rule.
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 7, 2025
Copy link
Member

@matthew-dean matthew-dean left a comment

Choose a reason for hiding this comment

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

LGTM!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 12, 2025
@luangong
Copy link

Hi! Does it support the following syntax?

@import "..." layer(...);

See @import - CSS | MDN.

@puckowski
Copy link
Contributor Author

Merging to avoid re-review and to keep future review scope small.

I have code for a separate PR to add support for:

@import url("theme.css") layer(theme);
@import url("features.css") layer(features) supports(display: grid);
@import url("responsive.css") layer(responsive) supports(display: flex) screen and (max-width: 768px);
@import url("print.css") layer(print) print;

@puckowski puckowski merged commit 36626c8 into less:master Apr 15, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants