Closed Bug 1901985 Opened 9 months ago Closed 3 months ago

[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)

enhancement

Tracking

(firefox135 fixed)

RESOLVED FIXED
135 Branch
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 or display: 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

Hi Sebastian! Would you be interested to fix this, this sounds like a good addition.

Flags: needinfo?(sebastianzartner)
Priority: -- → P3

Sure! I'm already on it, though it'll take a bit as the exact conditions are quite complicated to understand and check.

Sebastian

Flags: needinfo?(sebastianzartner)
Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED
Pushed by sebastianzartner@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e3e32b4370d1 [devtools] Handle 'content-visibility' property in inactive CSS. r=devtools-reviewers,fluent-reviewers,bolsson,nchevobbe.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: