This feature is a result of a CSSWG resolution: https://github.com/w3c/csswg-drafts/issues/8407#issuecomment-1440466558 content-visibility: auto is a property that can be used to optimize rendering of off-screen content. However, when rendering is optimized it also means that the size of the element cannot be determined using the descendant information. This is done with size containment. As a result, contain-intrinsic-size was added to help with this. When content-visibility: auto skips contents, contain-intrinsic-size determines its size (roughly as if it had a single child of specified size). contain-intrinsic-size also has an option to add an "auto" keyword which means "if the element has been previously rendered, then use that size; if not, use the specified size". This helps with layout stability by ensuring that elements that come into the viewport and then leave remain the same size as before. This feature tracks forcing contain-intrinsic-size: auto if content-visibility's value is auto.
There is a risk of interoperability here, since this changes the behavior of content-visibility: auto and contain-intrinsic-size interaction. Specifically, this forces the layout size of content-visibility: auto elements to be different after it becomes relevant to the user, even when the element starts skipping contents once again. Note that the developer does not have to specify contain-intrinsic-size values, since the default value of "none" can also gain the "auto" keyword. Although this risk exists, I believe the change is for the better, since the ability to size things appropriately under content-visibility has been a challenging piece of content-visibility adoption. Out of httparchive sites that use contain-intrinsic-size, roughly half already use "auto" variety.
This feature makes adoption of content-visibility: auto more straightforward, since off-screen element sizing becomes easier to deal with.
There are no activation risks.
There are no security risks with this feature, since it deals with CSS and Layout sizing.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
This feature uses CSS and is debuggable as any other CSS feature would be.
Shipping on desktop | 117 |
Shipping on Android | 117 |
Shipping on WebView | 117 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/35983500-d811-476e-aa4a-d726c6308ac8n%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw9QtaojrgnZy4pY7_2tpF_A1e%3DX0u289VBhAJZ3hg1aqQ%40mail.gmail.com.
Since this is a behavior change, I'd love to better understand the implications of this change on existing content, and the upper bounds of those implications.Do we have counters for existing usage that will render differently as a result of this shipping?
On Wed, Jul 19, 2023 at 6:01 PM Chris Harrelson <chri...@chromium.org> wrote:LGTM2On Wed, Jul 19, 2023 at 9:01 AM Alex Russell <sligh...@chromium.org> wrote:Please send this as an FYI to the TAG. The fact of something being agreed in the CSS WG does not say much for platform consistency and quality.Given that I grok this and think it's reasonable (with my ex-TAG member hat on), I'll give y'all a pass on a full review, but please file in future.LGTM1, contingent on sending an FYI to the TAG.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfVquK8te%2BL%2BFNYgwiUeHqzJ5MJL%2BsEVJQ7e_iecVC9Ldg%40mail.gmail.com.
On Thu, Jul 20, 2023 at 12:08 AM Yoav Weiss <yoav...@chromium.org> wrote:Since this is a behavior change, I'd love to better understand the implications of this change on existing content, and the upper bounds of those implications.Do we have counters for existing usage that will render differently as a result of this shipping?We don't have direct counters for this, no. I think this does impact a good number of sites, just based on the use counters for content-visibility and contain-intrinsic-size.The type of change is important to consider here: it changes behavior, but in all reasonable cases I can think of, it makes the behavior better. There are less size jumps and scrollbar jitters. This also causes a more stable layout (and indeed was the reason for this proposal on the referenced CSSWG).Of course there may be a site that is, for whatever reason, relying on the off-screen size to change. Unfortunately, I don't think we can find out the intent of that site until we launch the feature and hear from developers.