Closed lunaris closed 1 year ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 3b83b1bfc4e674af1517d3d7de482e5cc3ea397b: | -0.1% |
Covered Lines: | 273 |
Relevant Lines: | 275 |
Fixes #303. Closes #300.
This PR adds support for container queries, parsing and hoisting them in the same manner that media queries are. I'm not sure of the best way to do this in a manner that yields acceptable performance/conforms to the existing patterns in stylis, but I've taken a stab. The challenge is that currently, we only need to look ahead one character after an
@
to determine what to do, but with@container
this is not sufficient as there is also@counter-style
. I've thus taken what feels like a hacky approach to look ahead until then
, which I think is safe and seems to satisfy the test suite. All feedback gratefully received though!