less.js: @starting-style doesn't nest correctly
To reproduce:
[popover]:popover-open {
opacity: 1;
transform: scaleX(1);
@starting-style {
opacity: 0;
transform: scaleX(0);
}
}
Current behavior:
This produces the following output, which is clearly incorrect:
[popover]:popover-open {
opacity: 1;
transform: scaleX(1);
}
@starting-style {
opacity: 0;
transform: scaleX(0);
}
Expected behavior:
It should produce the following css:
[popover]:popover-open {
opacity: 1;
transform: scaleX(1);
@starting-style {
opacity: 0;
transform: scaleX(0);
}
}
Environment information:
lessversion: 4.2.0
This is based on the sample code from mdn: https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 17 (10 by maintainers)
PR #4289 should resolve this issue. I’ll support any requested revisions until it gets merged.
@puckowski v4.2.1 released - https://www.npmjs.com/package/less - it may have some pulls your fork does not.
Btw, this repo could definitely use more core contributors.
This issue should be resolved via release
4.3.0available on npm: https://www.npmjs.com/package/less/v/4.3.0Thank you for the report.
This Less:
becomes:
@jpattishall-ebay PR #4289 does not resolve/address the issue you are describing. Thank you for your comment and for raising that separate issue. I was not previously aware of that issue.
I’ve taken a look at your issue on Less.js 4.2.1 and I believe I have a fix, but I need some time for further testing and revision. I’ll try to prepare a separate PR by Friday 12/20/24.
I’ll likely get my fix into my fork and cut a release before I file the PR, so I will notify you if you’d like to use that while waiting on the official Less.js release.
Less.js 4.2.1 fork release with support for CSS Container Queries, Media Queries Level 4, starting-style at-rule, and scope at-rule support with all tests passing: https://github.com/puckowski/less.js/releases/tag/4.2.1-container-mq4-tr2-scope-1
I’ll likely get around to submitting a PR to this repo just for
@starting-stylenext weekend.If you use the fork and run into an issue, feel free to open an issue on the fork.