fix(issue#4242): add support for layer at-rule#4337
Conversation
* Add support for layer at-rule. * Add tests for layer at-rule.
|
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
@layerat-rule.Why:
The
@layerat-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: