[wpt-sync] Sync PR 65109 - [css-mixins] Support @private variables in mixins (5/N)
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65109 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65109
Details from upstream follow.
Stephanie Zhang <stephanie.zhang@microsoft.com> wrote:
[css-mixins] Support @private variables in mixins (5/N)
Adds @private support inside @mixin.
Each @apply gets its own copy of the mixin's private variables, so
separate applications do not share values. A mixin can declare @private
in its body, inside conditional rules, and inside rules nested in
@result.The mixin's private variables are not visible to the rule that applies
it. Rules from the @apply's @contents block are authored outside the
mixin, so they only see the private variables in scope at the @apply,
and can declare their own. The fallback @contents block inside the mixin
sees the mixin's private variables. A @private variable wins over a
mixin parameter with the same name.Low-Coverage-Reason: COVERAGE_UNDERREPORTED
Change-Id: I1a1c58ef4a0a0ad416c804525f8375fa1c8e49da
Fixed: 542651959
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8291715
Reviewed-by: Kevin Babbitt \<kbabbitt@microsoft.com>
Auto-Submit: Stephanie Zhang \<stephanie.zhang@microsoft.com>
Commit-Queue: Stephanie Zhang \<stephanie.zhang@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1743096}
| Assignee | ||
Updated•14 days ago
|
| Assignee | ||
Comment 1•14 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=123162
| Assignee | ||
Comment 2•14 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 3 tests and 14 subtests
Status Summary
Firefox
OK : 3
FAIL: 24
Chrome
OK : 3
PASS: 5
FAIL: 19
Safari
OK : 3
FAIL: 24
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/css-mixins/private/css-private-mixins-cssom.tentative.html [wpt.fyi]
- A mixin's private variables are not exposed in computed style:
FAIL(Chrome:FAIL, Safari:FAIL) - A rule applying a mixin with @private can be inserted:
FAIL(Chrome:FAIL, Safari:FAIL) - Replacing a mixin updates the private variables of its users:
FAIL(Chrome:FAIL, Safari:FAIL) - Elements sharing a rule with a mixin resolve its private variables separately:
FAIL(Chrome:FAIL, Safari:FAIL)
- A mixin's private variables are not exposed in computed style:
- /css/css-mixins/private/css-private-mixins-nesting.tentative.html [wpt.fyi]
- A mixin from another style sheet keeps its own private variables:
FAIL(Chrome:FAIL, Safari:FAIL) - Nested mixins with the same private name do not share it:
FAIL(Chrome:FAIL, Safari:FAIL) - @private in a matching conditional rule in a mixin:
FAIL(Chrome:FAIL, Safari:FAIL) - @private in a non-matching conditional rule in a mixin is not set:
FAIL(Chrome:PASS, Safari:FAIL) - The fallback @contents block sees the mixin's private variables:
FAIL(Chrome:FAIL, Safari:FAIL) - The @apply's @contents block replaces the fallback and cannot see the mixin's private variables:
FAIL(Chrome:PASS, Safari:FAIL)
- A mixin from another style sheet keeps its own private variables:
- /css/css-mixins/private/css-private-mixins.tentative.html [wpt.fyi]
- Each @apply resolves its private variables on the applying element:
FAIL(Chrome:FAIL, Safari:FAIL) - Mixin declarations can override a private variable:
FAIL(Chrome:FAIL, Safari:FAIL) - Mixin private variables inherit to descendants:
FAIL(Chrome:FAIL, Safari:FAIL) - Mixin private variables are not visible to siblings:
FAIL(Chrome:PASS, Safari:FAIL) - The applying rule cannot see the mixin's private variables:
FAIL(Chrome:FAIL, Safari:FAIL) - A mixin's private variable is separate from one with the same name on the applying rule:
FAIL(Chrome:FAIL, Safari:FAIL) - Rules passed through @contents cannot see the mixin's private variables:
FAIL(Chrome:PASS, Safari:FAIL) - @private works in an @apply's @contents block and is separate from the mixin's private variable with the same name:
FAIL(Chrome:FAIL, Safari:FAIL) - @private in an @apply's @contents block inside a mixin:
FAIL(Chrome:FAIL, Safari:FAIL) - Each @apply of the same mixin has its own private variable:
FAIL(Chrome:FAIL, Safari:FAIL) - A @private variable shadows a mixin parameter with the same name:
FAIL(Chrome:FAIL, Safari:FAIL) - A mixin parameter shadows a private variable of the applying rule:
FAIL(Chrome:PASS, Safari:FAIL) - @private works in a rule nested in a mixin:
FAIL(Chrome:FAIL, Safari:FAIL) - A rule nested in a mixin sees the mixin's private variables:
FAIL(Chrome:FAIL, Safari:FAIL)
- Each @apply resolves its private variables on the applying element:
Comment 4•13 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/236fcc6bb050
https://hg.mozilla.org/mozilla-central/rev/fa94565b31fe
Description
•