Closed Bug 1804247 Opened 2 years ago Closed 2 years ago

Result of evaluating a size feature should be unknown if the container lacks size containment

Categories

(Core :: CSS Parsing and Computation, defect)

defect

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.

For example, inline elements can have container-type: size but they don't support size containment, so @container (width >= 0) shouldn't match.

<!DOCTYPE html>
<style>
span { container-type: size }
@container (width >= 0) {
  b { color: red }
}
</style>
<span><b>Shouldn't be red</b></span>

For example, inline elements may have container-type:size but they don't
support size containment, so @container(width >= 0) shouldn't match.

Pushed by oriol-bugzilla@hotmail.com: https://hg.mozilla.org/integration/autoland/rev/5c9162c8a681 Evaluate size feature to unknown if the container lacks size containment. r=emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Regressions: 1921677
No longer regressions: 1921677
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: