[css-values-5] @container style query using var from attr() does not invalidate when number changes
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox156 | --- | wontfix |
| firefox157 | --- | verified |
| firefox158 | --- | verified |
People
(Reporter: ahudson, Assigned: emilio)
References
Details
(Keywords: regressionwindow-wanted)
Attachments
(3 files, 2 external files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:158.0) Gecko/20100101 Firefox/158.0
Steps to reproduce:
- go to https://codepen.io/editor/bigandy/pen/01a08c44-57f9-76be-9759-92864ceb6fcc
- click on the button to update the data-count value set on the <ul>
Actual results:
The number updates but the styles do not update.
Expected results:
the styles should update so that on an odd count the colours should be red-green-red-green etc, on an even count the colours should be cyan-pink-cyan-pink etc
Not sure if this is relevant or not but when I add another @container style() query to the original demo code the @container style query is invalidated even though the new style query is not matched.
See this demo: https://codepen.io/editor/bigandy/pen/01a09056-20f4-7091-9cbd-6d6115125c81
Updated•2 months ago
|
Comment 3•2 months ago
|
||
:sukil, since you are the author of the regressor, bug 2047198, could you take a look?
For more information, please visit BugBot documentation.
Comment 4•2 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 5•2 months ago
|
||
I think that what's going on is that we're not keeping track of the var reference in the style query properly
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 6•2 months ago
|
||
So that we invalidate properly when it changes.
Updated•2 months ago
|
Updated•2 months ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62671 for changes under testing/web-platform/tests
Comment 9•2 months ago
|
||
| bugherder | ||
Comment 10•2 months ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox157towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•2 months ago
|
Comment 11•2 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Incorrect styling in some dynamic cases.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: comment 0
- Risk associated with taking this patch: low
- Explanation of risk level: Relatively straight-forward fix.
- String changes made/needed?: none
- Is Android affected?: yes
| Assignee | ||
Comment 12•2 months ago
|
||
So that we invalidate properly when it changes.
Original Revision: https://phabricator.services.mozilla.com/D325722
Upstream PR merged by moz-wptsync-bot
Updated•2 months ago
|
Updated•2 months ago
|
Comment 14•2 months ago
|
||
| uplift | ||
Updated•2 months ago
|
Updated•2 months ago
|
Comment 15•2 months ago
|
||
I've reproduced this issue using Firefox 157.0a1 (2026.08.30) on macOS 12.
Verified as fixed on the latest Nightly 158.0a1 (2026.09.15) and on Firefox 157.0b2 using build from treeherder, with Ubuntu 24, macOS 12 and Windows 11, where the issue no longer persists, now the count colors changes as expected.
Updated•2 months ago
|
Description
•