Skip to content

CSS scroll state container queries and improved function handling #4342

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

puckowski
Copy link
Contributor

What:

Add Less.js support for container queries to style descendants of containers based on their scroll state.

This PR also aims to improve function handling for @media and @container without adding new functions to the function registry as was done in #4311.

With this solution, future CSS functions should work without having to update Less code.

Why:

Container query scroll state support is available in Chrome 133 (https://developer.chrome.com/blog/chrome-133-beta). Getting ahead of broader support. Without this PR the Less.js output of scroll-state is incorrect.

Global support suggests 65.76% availability per https://caniuse.com/?search=scroll-state.

Checklist:

  • Documentation
  • Added/updated unit tests
  • Code complete

* Add support for CSS scroll state container queries.
* Improve at-rule function handling.
* Clean up scroll-state solution code for merge.
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 26, 2025
@puckowski
Copy link
Contributor Author

Closed #4311 in favor of this PR.

This PR adopts the feedback provided for #4311 of not adding functions to the function registry while deferring the broader effort of unifying @container, @media, @support and potentially other at-rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant