Intent to Ship: Re-add 'style' to contain:strict and contain:content CSS properties

86 views
Skip to first unread message

Chris Harrelson

unread,
Jun 21, 2021, 10:51:06 PM6/21/21
to blink-dev

Contact emails

chri...@chromium.org

Explainer

None

Specification

https://github.com/w3c/csswg-drafts/commit/7948feb03a9aaceb3a8ee423b07c6e526024cdc2

API spec

Yes

Summary

The 'strict' and 'content' keywords for the 'contain' property will now include 'style'. Per CSSWG resolution this was (re-)added now that contain:style is well-defined in the specifications.


Subsequently, the spec issues were fixed and consensus was achieved, so contain:style is now being re-added.


Blink component

Blink>CSS

TAG review

None. This is re-adding a single keyword removed in a previous intent for a mature specification that already has shipped support in Blink and Gecko.

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Sites may change behavior slightly when contain:strict or contain:content is specified. In particular, CSS counters and ordered lists which include elements both inside and outside the contain:strict or contain:content element would be reset (start again at 1) at the boundaries. This should be very uncommon.


Gecko: No signal (skipped because it's just re-adding a keyword previously also removed via CSSWG resolution with representatives present)

WebKit: No signal (skipped because it's just re-adding a keyword previously also removed via CSSWG resolution with representatives present)

Web developers: No signals

Activation

Once Chromium ships this, Gecko has verbally agreed to follow. Webkit has only recently started implementing the containment spec.



Is this feature fully tested by web-platform-tests?

Yes


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1220736

Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/6669265396563968

This intent message was generated by Chrome Platform Status.


Chris Harrelson

unread,
Jun 22, 2021, 12:16:45 PM6/22/21
to blink-dev
On Mon, Jun 21, 2021 at 7:50 PM Chris Harrelson <chri...@chromium.org> wrote:

Contact emails

chri...@chromium.org

Explainer

None

Specification

https://github.com/w3c/csswg-drafts/commit/7948feb03a9aaceb3a8ee423b07c6e526024cdc2

API spec

Yes

Summary

The 'strict' and 'content' keywords for the 'contain' property will now include 'style'. Per CSSWG resolution this was (re-)added now that contain:style is well-defined in the specifications.


A previous intent removed the 'style' keyword from 'strict' and contain. See here. This intent is for re-adding it now that there is a consensus-based specification.

Manuel Rego Casasnovas

unread,
Jun 23, 2021, 4:15:27 AM6/23/21
to Chris Harrelson, blink-dev
LGTM1

On 22/06/2021 18:16, Chris Harrelson wrote:
>
>
> On Mon, Jun 21, 2021 at 7:50 PM Chris Harrelson <chri...@chromium.org
> <mailto:chri...@chromium.org>> wrote:
>
>
> Contact emails
>
>
> chri...@chromium.org <mailto:chri...@chromium.org>
>
>
> Explainer
>
>
> None
>
>
> Specification
>
>
> https://github.com/w3c/csswg-drafts/commit/7948feb03a9aaceb3a8ee423b07c6e526024cdc2
> <https://github.com/w3c/csswg-drafts/commit/7948feb03a9aaceb3a8ee423b07c6e526024cdc2>
>
>
> API spec
>
>
> Yes
>
>
> Summary
>
>
> The 'strict' and 'content' keywords for the 'contain'
> property will now include 'style'. Per CSSWG resolution this
> was (re-)added now that contain:style is well-defined in the
> specifications.
>
>
> A previous intent removed the 'style' keyword from 'strict' and contain.
> See here
> <https://groups.google.com/a/chromium.org/g/blink-dev/c/fKtqaykk4Bs/m/SOAvgeOyCwAJ>.
> This intent is for re-adding it now that there is a consensus-based
> specification.
>  
>
>
> Subsequently, the spec issues were fixed and consensus was
> achieved
> <https://github.com/w3c/csswg-drafts/issues/6287#issuecomment-862525199>,
> so contain:style is now being re-added.
>
>
> Blink component
>
>
> Blink>CSS
> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3ECSS>
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?
>
>
> Yes
>
>
>
> Tracking bug
>
>
> https://bugs.chromium.org/p/chromium/issues/detail?id=1220736 <https://bugs.chromium.org/p/chromium/issues/detail?id=1220736>
>
>
> Link to entry on the Chrome Platform Status
>
>
> https://www.chromestatus.com/feature/6669265396563968
> <https://www.chromestatus.com/feature/6669265396563968>
>
> This intent message was generated by Chrome Platform Status
> <https://www.chromestatus.com/>.
>
>
> --
> 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
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_am%2BFCQrsZ9bPVC5wHu%3DQvK7BAMhtG97UYYM2gOmdLCg%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_am%2BFCQrsZ9bPVC5wHu%3DQvK7BAMhtG97UYYM2gOmdLCg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Yoav Weiss

unread,
Jun 25, 2021, 3:27:12 AM6/25/21
to blink-dev, Manuel Rego, Chris Harrelson
LGTM2

We previously discussed conditions for skipping TAG review and browser signals, but I don't think we ever formalized them. 

I think this falls into that bucket. The only exception from what we previously discussed is we are the first to ship, but with other browsers committed to fast-follow, which sounds like something we can add to the exception list.

I also think it'd be good to add those conditions to our general guidance on TAG reviews, so that the guidelines would be clearer.

Manuel Rego Casasnovas

unread,
Jun 25, 2021, 3:50:41 AM6/25/21
to Yoav Weiss, blink-dev, Chris Harrelson


On 25/06/2021 09:27, Yoav Weiss wrote:
> We previously discussed 
> <https://groups.google.com/a/chromium.org/g/blink-api-owners-discuss/c/uBxq9uCpKx0/m/A5LI0NbyAAAJ>conditions
> for skipping TAG review and browser signals, but I don't think we ever
> formalized them. 
>
> I think this falls into that bucket. The only exception from what we
> previously discussed is we are the first to ship, but with other
> browsers committed to fast-follow, which sounds like something we can
> add to the exception list.

Just some clarification. This was shipped long time ago in Chromium, and
then it was unshipped as Mozilla didn't find style containment useful by
that time [1].
Now (as style containment is being tweaked and with the needs regarding
container queries) the CSSWG has discussed and agreed to re-add it, and
Mozilla and other vendors are on board with that decision. But that
doesn't mean that they will fast-follow AFAIK.

BTW WebKit has a patch for this that is under review
https://bugs.webkit.org/show_bug.cgi?id=226458 to implement style
containment. And as WebKit hasn't shipped any containment support yet, I
guess they would include style containment in strict and content values.

Cheers,
Rego

[1]
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuPfeQGW0bnjoEQeZG4x01K-FTnm1DaaioHTCZqY4oyeKfmoA%40mail.gmail.com?utm_medium=email&utm_source=footer

>
> I also think it'd be good to add those conditions to our general
> guidance on TAG reviews, so that the guidelines would be clearer.
>
> On Wednesday, June 23, 2021 at 10:15:27 AM UTC+2 Manuel Rego wrote:
>
> LGTM1
>
> On 22/06/2021 18:16, Chris Harrelson wrote:
> >
> >
> > On Mon, Jun 21, 2021 at 7:50 PM Chris Harrelson
> <chri...@chromium.org <mailto:chri...@chromium.org>
> > <mailto:chri...@chromium.org <mailto:chri...@chromium.org>>> wrote:
> >
> >
> > Contact emails
> >
> >
> > chri...@chromium.org <mailto:chri...@chromium.org>
> <mailto:chri...@chromium.org <mailto:chri...@chromium.org>>
> > <https://www.chromestatus.com/ <https://www.chromestatus.com/>>.
> >
> >
> > --
> > 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
> <mailto:blink-dev%2Bunsu...@chromium.org>
> > <mailto:blink-dev+...@chromium.org
> <mailto:blink-dev%2Bunsu...@chromium.org>>.
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_am%2BFCQrsZ9bPVC5wHu%3DQvK7BAMhtG97UYYM2gOmdLCg%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_am%2BFCQrsZ9bPVC5wHu%3DQvK7BAMhtG97UYYM2gOmdLCg%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
>

Rick Byers

unread,
Jun 25, 2021, 11:40:04 AM6/25/21
to Manuel Rego Casasnovas, Yoav Weiss, blink-dev, Chris Harrelson
LGTM3 - agree this looks trivial

Ideally we'd be able to quantify the compat risk a little better, but my judgement of the risk is that it's on the order we'd normally consider 'bug fix'. So I'm OK with just landing and keeping ears open. Let's be prepared to re-evaluate if we get any concrete report of breakage.

Rick

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/699cf99f-2b1e-ca42-7ca8-d466b4ddab03%40igalia.com.
Reply all
Reply to author
Forward
0 new messages