Skip to content

Conversation

puckowski
Copy link
Contributor

What:

This pull request resolves issue #4267 by fixing @starting-style at-rule nesting.

Why:

Users of Less.js may wish to use newer features of CSS supported by newer versions of most browsers. Estimated support for @starting-style is 86.48%+ (https://caniuse.com/mdn-css_at-rules_starting-style).

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

Per comment on #4289 I worked to add support for the starting-style at-rule by bolstering base AtRule tree node capabilities.

The following Less:

[popover]:popover-open {
    opacity: 1;
    transform: scaleX(1);

    @starting-style {
        opacity: 0;
        transform: scaleX(0);
    }
}

becomes:

[popover]:popover-open {
  opacity: 1;
  transform: scaleX(1);
  @starting-style {
    opacity: 0;
    transform: scaleX(0);
  }
}

* Add support for the starting-style at-rule.
* Improve at-rule comment and call handling and add more starting-style
  at-rule tests.
* Refactor new code introduced to broaded at-rule support for
  starting-syle at-rule and other at-rules.
* Cleanup at-rule enhancement code for starting-style at-rule support.
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 29, 2025
@matthew-dean
Copy link
Member

Thank you! Do you know why checks show as cancelled or failed?

* Pin Playwright to exact version to try to resolve CI issues.
@puckowski
Copy link
Contributor Author

I thought ~1.50.1 (#4322) would be safe for Playwright not fully knowing how closely they adhere to semver semantics.

I made it an exact version here (1.50.1) and CI passed. I guess that is necessary given our setup, though I'd like to improve it in the future.

@matthew-dean

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 31, 2025
@matthew-dean matthew-dean merged commit 5d3f6ea into less:master Mar 31, 2025
7 checks passed
@puckowski
Copy link
Contributor Author

Thank you for reviewing and merging. I will try to prepare a release PR around this Friday so we can ship @starting-style support.

@matthew-dean

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.

2 participants