You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my current interpretation content-visibility does not apply to most SVG elements since content-visibility applies to
"elements for which [size containment] can apply" (https://drafts.csswg.org/css-contain/#content-visibility)
and (size) contain has a special rule about applying to svg:
"In addition, in the case of [SVG2], the contain property only applies to svg elements that have an associated CSS layout box."
(https://drafts.csswg.org/css-contain/#contain-applies)
So, would that be just outer <svg> and <foreignObject> elements?
I am willing to write some WPT tests for this since I don't think this is actually tested on SVG elements at this time.
This interpretation makes sense to me. Size containment is important for the optimization that c-v makes, so if it doesn't apply, then c-v should also not apply.
To confirm: the spec would not need to change, since it effectively states this, right?
To confirm: the spec would not need to change, since it effectively states this, right?
Well, one thing I could not find in the specifications is which SVG elements have an associated CSS layout box. Because I kind of know from the implementation to me it sort of is clear, not sure for others.
Activity
rwlbuis commentedon Oct 16, 2023
I added a test on an SVG element that has no associated CSS layout box (<g>):
web-platform-tests/wpt#42552
rwlbuis commentedon Oct 16, 2023
@vmpstr what is your interpretation? Also feel free to add more people :)
vmpstr commentedon Oct 16, 2023
This interpretation makes sense to me. Size containment is important for the optimization that c-v makes, so if it doesn't apply, then c-v should also not apply.
To confirm: the spec would not need to change, since it effectively states this, right?
rwlbuis commentedon Oct 18, 2023
Well, one thing I could not find in the specifications is which SVG elements have an associated CSS layout box. Because I kind of know from the implementation to me it sort of is clear, not sure for others.
I realised we do not really test the root <svg>, so I created web-platform-tests/wpt#42594.