Intent to Implement and Ship: CSS containment: Remove style from strict and content

139 views
Skip to first unread message

Rune Lillesveen

unread,
Apr 25, 2019, 6:59:42 AM4/25/19
to blink-dev
fut...@chromium.org N/A Specification: https://drafts.csswg.org/css-contain/#contain-property N/A N/A The 'strict' and 'content' keywords for the 'contain' property used to include 'style'. Per CSSWG resolution and spec change this is no longer the case. No other browser ships style containment, Firefox were reluctant to ship due to usefulness of counters containment and compat with Chrome, and the CSSWG resolved to remove style from 'strict' and 'content' which has been reflected in the specification.
Chrome is the only browser which has shipped style containment. The compat risk is for documents relying on the Blink-only behavior for CSS counters and style containment where contain:content or contain:strict is used. I expect this to be very low risk. Interop: this change will make CSS counters inside contain:strict/content more interoperable. Firefox: Public support Mozilla proposed this resolution. They did not want to style containment at all. Edge: No public signals Safari: No public signals WebKit has not shipped CSS containment. For some reason it's marked as passing all tests in wpt.fyi. Web developers: No signals
Yes Yes This change is to fix the two failing tests here: https://wpt.fyi/results/css/css-contain/parsing/contain-computed.html https://crbug.com/947730 https://www.chromestatus.com/features/5136053209923584

Yoav Weiss

unread,
Apr 25, 2019, 8:44:23 AM4/25/19
to Rune Lillesveen, blink-dev
Since this change will result in alignment with other vendors and in better web compatibility,
LGTM1

Developers that would still want to force that behavior (in Chromium) would be able to use the "style" keyword.
It would be good to introduce counters for "style" containment. If usage is high after this removal, that could be evidence that developers actually find it useful. If it isn't, it could be evidence to the contrary. (although weaker one, as single-vendor support may hold usage back)


--
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/CACuPfeQGW0bnjoEQeZG4x01K-FTnm1DaaioHTCZqY4oyeKfmoA%40mail.gmail.com.

Rune Lillesveen

unread,
Apr 25, 2019, 9:36:19 AM4/25/19
to Yoav Weiss, blink-dev
On Thu, Apr 25, 2019 at 2:44 PM Yoav Weiss <yo...@yoav.ws> wrote:
Developers that would still want to force that behavior (in Chromium) would be able to use the "style" keyword.
It would be good to introduce counters for "style" containment. If usage is high after this removal, that could be evidence that developers actually find it useful. If it isn't, it could be evidence to the contrary. (although weaker one, as single-vendor support may hold usage back)

Yoav Weiss

unread,
Apr 25, 2019, 9:42:07 AM4/25/19
to Rune Lillesveen, blink-dev
This seems to be counting usage of "style" but not instances where it actually makes a difference, right? (e.g. It's not counting places where "style" is used and the impacted container has counters inside of it)
I guess that's fine as after this removal any use of style would be the developer expressing explicit interest in isolating counters.

Rune Lillesveen

unread,
Apr 25, 2019, 9:47:36 AM4/25/19
to Yoav Weiss, blink-dev
Correct. Let's do this in Gerrit.

Manuel Rego Casasnovas

unread,
Apr 25, 2019, 9:51:54 AM4/25/19
to Yoav Weiss, Rune Lillesveen, blink-dev

On 25/04/2019 14:44, Yoav Weiss wrote:
> Developers that would still want to force that behavior (in Chromium)
> would be able to use the "style" keyword.
> It would be good to introduce counters for "style" containment. If usage
> is high after this removal, that could be evidence that developers
> actually find it useful. If it isn't, it could be evidence to the
> contrary. (although weaker one, as single-vendor support may hold usage
> back)

BTW, note that "contain: style" implementation has been pretty broken
(see crbug.com/855798, crbug.com/869296, crbug.com/882383,
crbug.com/882385). So I'm not sure how many usage it actually has, or if
it's actually doing anything in some of the cases where it's used.

Bye,
Rego

Yoav Weiss

unread,
Apr 25, 2019, 9:58:47 AM4/25/19
to Manuel Rego Casasnovas, Rune Lillesveen, blink-dev
Thanks for the input! I'd take this to mean that if it is used, it's really strong evidence of its necessity, but if it isn't we can't know for sure why.
 

Bye,
  Rego


--
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.

Manuel Rego Casasnovas

unread,
Apr 25, 2019, 10:07:09 AM4/25/19
to Yoav Weiss, Rune Lillesveen, blink-dev


On 25/04/2019 15:58, Yoav Weiss wrote:
>
>
> On Thu, Apr 25, 2019 at 3:51 PM Manuel Rego Casasnovas <re...@igalia.com
> <mailto:re...@igalia.com>> wrote:
>
>
> On 25/04/2019 14:44, Yoav Weiss wrote:
> > Developers that would still want to force that behavior (in Chromium)
> > would be able to use the "style" keyword.
> > It would be good to introduce counters for "style" containment. If
> usage
> > is high after this removal, that could be evidence that developers
> > actually find it useful. If it isn't, it could be evidence to the
> > contrary. (although weaker one, as single-vendor support may hold
> usage
> > back)
>
> BTW, note that "contain: style" implementation has been pretty broken
> (see crbug.com/855798 <http://crbug.com/855798>, crbug.com/869296
> <http://crbug.com/869296>, crbug.com/882383 <http://crbug.com/882383>,
> crbug.com/882385 <http://crbug.com/882385>). So I'm not sure how
> many usage it actually has, or if
> it's actually doing anything in some of the cases where it's used.
>
>
> Thanks for the input! I'd take this to mean that if it is used, it's
> really strong evidence of its necessity, but if it isn't we can't know
> for sure why.

Or maybe when the bugs are fixed and it starts to do more things, people
need to remove style containment in some places they're using it now.
So I guess we cannot know a lot about the usage yet, until the feature
is fixed. Maybe we can add some very specific use counters for the
things that are actually working on style containment and make a
difference when you don't use it.

Bye,
Rego

Daniel Bratell

unread,
Apr 25, 2019, 11:08:10 AM4/25/19
to Yoav Weiss, Manuel Rego Casasnovas, Rune Lillesveen, blink-dev
LGTM2

/Daniel
--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Chris Harrelson

unread,
Apr 30, 2019, 12:36:03 PM4/30/19
to Daniel Bratell, Yoav Weiss, Manuel Rego Casasnovas, Rune Lillesveen, blink-dev
LGTM3

--
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.
Reply all
Reply to author
Forward
0 new messages