[Inactive CSS] Display a warning when 'content-visibility' is used on elements for which size containment doesn't apply
Categories
(DevTools :: Inspector: Rules, enhancement, P3)
Tracking
(firefox135 fixed)
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: sebo, Assigned: sebo)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [importance-82.4%])
Attachments
(1 file)
The content-visiblity
property only applies to elements for which size containment applies.
Regarding size containment, the spec. says this:
… giving an element size containment has no effect if any of the following are true:
- if the element does not generate a principal box (as is the case with
display: contents
ordisplay: none
)- if its inner display type is
table
- if its principal box is an internal table box
- if its principal box is an internal ruby box or a non-atomic inline-level box
Main file:
devtools/server/actors/utils/inactive-property-helper.js
invalidProperties: [
"content-visibility",
]
inactive-css-no-size-containment = <strong>{ $property }</strong> has no effect on this element since it has no size containment.
inactive-css-no-size-containment-fix = Try setting its <strong>display</strong> property to something else than <strong>none</strong, <strong>contents</strong>, <strong>table</strong>, or <strong>inline-table</strong> and make sure it's not within a table or ruby segment. { learn-more }
Sebastian
Comment 1•4 months ago
|
||
Hi Sebastian! Would you be interested to fix this, this sounds like a good addition.
Assignee | ||
Comment 2•3 months ago
|
||
Sure! I'm already on it, though it'll take a bit as the exact conditions are quite complicated to understand and check.
Sebastian
Assignee | ||
Comment 3•3 months ago
|
||
Updated•3 months ago
|
Description
•