-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-contain-2] Used value of contain #6246
Comments
I agree, fwiw. |
I agree it shouldn't alter the computed value, and didn't intend for it to. Do we really need to expose the active set of containments in gCS()? (I'm fine if we do need to, I just want to make sure there's a need and it's not just taken for granted.) |
(My intention, fwiw, is that it had no effect whatsoever on the 'contain' property. An element having certain containments is just a quality it can possess, and the 'contain' property is one way of applying them, not the only way. But if we think it's useful to communicate the current set of containments, then doing so via the resolved value of 'contain' does indeed seem like the most straightforward way to do so.) |
As far as I'm concerned, not affecting
By default I would have interpreted the spec that way as well (after all it doesn't explicitly mention messing with the |
As long as the effects of containment still apply when the content-visibility spec says such containment is turned on (which is true), I don't really think we need to change There may be a chance that developers rely on this as a way to know whether content-visibility: auto element is currently being skipped or not via presence of size containment. However, I don't think they should be, and the spec never intended that. It seems like this is a "no change needed" for the spec, and simply a bug in Blink. WDYT? |
Works for me. |
DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040
DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040
DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192}
DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192}
DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192}
… for locked elements, a=testonly Automatic update from web-platform-tests Don't modify computed value of 'contain' for locked elements DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192} -- wpt-commits: 4c5408d354ca9eb460bec40db10ae941a20ec865 wpt-pr: 29948
… for locked elements, a=testonly Automatic update from web-platform-tests Don't modify computed value of 'contain' for locked elements DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192} -- wpt-commits: 4c5408d354ca9eb460bec40db10ae941a20ec865 wpt-pr: 29948
DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192} NOKEYCHECK=True GitOrigin-RevId: b4ac918d3ee3276004ccba806cea0ba1b49796b8
This is a follow up on #6246, the prior edit was incomplete.
… for locked elements, a=testonly Automatic update from web-platform-tests Don't modify computed value of 'contain' for locked elements DisplayLockContext::AdjustElementStyle currently modifies the computed value of 'contain'. It should not [1]. Instead we store a bit on ComputedStyle to indicate whether or not the element should skip its contents [2], and use this flag used- value-time to request the appropriate containment. [1] w3c/csswg-drafts#6246 [2] https://drafts.csswg.org/css-contain-2/#skips-its-contents Fixed: 1203627 Change-Id: I5571b0a5fac1b89903c03a256a2b144bddcd5040 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3081725 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#910192} -- wpt-commits: 4c5408d354ca9eb460bec40db10ae941a20ec865 wpt-pr: 29948
The spec says that
content-visibility
can "turn on" layout/style/etc containment, but it's not clear what effect (if any) this has on the computed/used value ofcontain
.I think the most logical thing would be to specify that if
content-visibility
is such-and-such, then the used value ofcontain
becomes this-and-that, and specify that the resolved value is the used value.I bring this up because the Blink implementation of
content-visibility
modifies the computed value ofcontain
, which seems heavy-handed. Introducing computed-value time dependencies between properties comes at a price. We should avoid doing so unless it's crucial.cc @vmpstr
The text was updated successfully, but these errors were encountered: