-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Conversation
* Add support for layer at-rule. * Add tests for layer at-rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hi! Does it support the following syntax? @import "..." layer(...); See @import - CSS | MDN. |
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; |
Created a PR #4340 for supporting the following syntax: @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 Hey, I figured out today you missed part of the You can do: @layer framework.layout {
p {
margin-block: 1rem;
}
} See: https://developer.mozilla.org/en-US/docs/Web/CSS/@layer |
@matthew-dean #4351 with #4349 should resolve that issue pending a release to npm (4.4.1). This less: @layer framework.layout {
p {
margin-block: 1rem;
}
} becomes this CSS: @layer framework.layout {
p {
margin-block: 1rem;
}
} on latest master. |
@puckowski Oh! My bad. I guess I missed publishing. Done. |
Thank you for publishing @matthew-dean I did a quick test of |
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: