Commit Graph
4 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez d27b7c56a3 Bug 1839945 - [css-nesting] Properly restrict nested rules. r=zrhoffman
As per https://drafts.csswg.org/css-nesting/#conditionals only some
rules are allowed inside style rules.

Differential Revision: https://phabricator.services.mozilla.com/D181798
2023-06-26 20:36:12 +00:00
Matthieu DubetandMatthieu Dubet b4b3662ec3 Bug 1830728 [wpt PR 39779] - CSS Nesting: @layer is a valid group rule, a=testonly
Automatic update from web-platform-tests
CSS Nesting: @layer is a valid group rule (#39779)

Co-authored-by: Matthieu Dubet <[email protected]>

--

wpt-commits: 0fca472175e9a342b809fc4c2eb035cf3ccb68cf
wpt-pr: 39779
2023-05-21 22:43:50 +00:00
Steinar H. Gunderson d784617df5 Bug 1797286 [wpt PR 36648] - [css-nesting] Serialize declarations in conditional group rules., a=testonly
Automatic update from web-platform-tests
[css-nesting] Serialize declarations in conditional group rules.

When we have an implicit & {} rule in a conditional group rule
added to hold declarations (since we don't support having declarations
immediately inside such rules), or something that looks very much
like it, remove that & {} and serialize only the declarations.
This is consistent with CSS' usual guideline that we serialize
to the shortest possible form.

In the process, I discovered that we have no spec for serializing
conditional group rules with declarations in them, so I wrote up
one that describes this removal of implicit & {}. This has been
consolidated in a post in https://github.com/w3c/csswg-drafts/issues/7850.

Added a tentative WPT test.

Change-Id: I46aee5ceffcf2b30a6faf3cb51f51eeb02ee67ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3972483
Commit-Queue: Steinar H Gunderson <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1063249}

--

wpt-commits: 78060051714b10eb06f9a6a06a75d561dfcd6c14
wpt-pr: 36648
2022-11-11 12:31:50 +00:00
Steinar H. Gunderson b51d67df87 Bug 1796762 [wpt PR 36586] - [css-nesting] Disallow nested non-conditional group rules in CSSOM., a=testonly
Automatic update from web-platform-tests
[css-nesting] Disallow nested non-conditional group rules in CSSOM.

We already disallow non-conditional group rules (such as @layer)
in nesting context (after the last patch, even if the nesting is
indirect). However, we could insert them via CSSOM, allowing
invalid rules to be built up that way. Disallow it and add a test.

Change-Id: I6485d187a7a430c101652360428fe42b608f72bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3970661
Commit-Queue: Steinar H Gunderson <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1063227}

--

wpt-commits: 7c43cc22484a4c6ff65988a9ba0c681739f7903b
wpt-pr: 36586
2022-11-11 12:31:47 +00:00