Closed
Bug 1804066
Opened 2 years ago
Closed 2 years ago
Container queries shouldn't treat an element with no box as having a size of 0
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
109 Branch
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: Oriol, Assigned: Oriol)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
https://drafts.csswg.org/css-contain-3/#size-container
If the query container does not have a principal box, or the principal box is not a layout containment box, or the query container does not support container size queries on the relevant axes, then the result of evaluating the size feature is unknown.
So @container (width: 0)
should not match. Testcase:
<!DOCTYPE html>
<style>
div {
container-type: inline-size;
display: contents;
}
@container (width: 0) {
p { background: red; }
}
</style>
<div><p>Should not be red</p></div>
Assignee | ||
Comment 1•2 years ago
|
||
Depends on D163784
Pushed by oriol-bugzilla@hotmail.com:
https://hg.mozilla.org/integration/autoland/rev/5151bf7e6a21
@container(width:0) shouldn't match elements with no box. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37346 for changes under testing/web-platform/tests
Comment 4•2 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox109:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in
before you can comment on or make changes to this bug.
Description
•