Skip to content

[css-transforms-1] Should will-change: transform be treated as transform for background-attachment:fixed? #6951

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

Closed
wangxianzhu opened this issue Jan 14, 2022 · 2 comments
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-transforms-1 Current Work

Comments

@wangxianzhu
Copy link

The current spec says:

Fixed backgrounds on the root element are affected by any transform specified for that element. For all other elements that are effected by a transform (i.e. have a transform applied to them, or to any of their ancestor elements), a value of fixed for the background-attachment property is treated as if it had a value of scroll. The computed value of background-attachment is not affected.

It doesn't mention will-change:transform. However, if we don't treat will-change:transform as transform, future change of transform from initial to non-identity will cause jump of the background.

Current browser behaviors about treating will-change:transform as transform for background-attachment-fixed:

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jan 14, 2022
…fixed

This is to prevent jump of background when an element with will-change:
transform changes transform from initial to non-identity. This is not in
the spec yet, so the test case is tentative with a css-transforms-1 bug
is filed at w3c/csswg-drafts#6951. Firefox
already has this behavior.

Bug: 1286593
Change-Id: I4247824b5af28613644bcd334832ff22b9483384
aarongable pushed a commit to chromium/chromium that referenced this issue Jan 14, 2022
…fixed

This is to prevent jump of background when an element with will-change:
transform changes transform from initial to non-identity. This is not in
the spec yet, so the test case is tentative with a css-transforms-1 bug
is filed at w3c/csswg-drafts#6951. Firefox
already has this behavior.

Bug: 1286593
Change-Id: I4247824b5af28613644bcd334832ff22b9483384
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3385337
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959058}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jan 14, 2022
…fixed

This is to prevent jump of background when an element with will-change:
transform changes transform from initial to non-identity. This is not in
the spec yet, so the test case is tentative with a css-transforms-1 bug
is filed at w3c/csswg-drafts#6951. Firefox
already has this behavior.

Bug: 1286593
Change-Id: I4247824b5af28613644bcd334832ff22b9483384
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3385337
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959058}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Jan 14, 2022
…fixed

This is to prevent jump of background when an element with will-change:
transform changes transform from initial to non-identity. This is not in
the spec yet, so the test case is tentative with a css-transforms-1 bug
is filed at w3c/csswg-drafts#6951. Firefox
already has this behavior.

Bug: 1286593
Change-Id: I4247824b5af28613644bcd334832ff22b9483384
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3385337
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959058}
@SelenIT
Copy link
Collaborator

SelenIT commented Jan 14, 2022

I believe that this paragraph from [css-will-change] applies here:

If any non-initial value of a property would cause rendering differences on the element (...), the user agent should use that alternate rendering when the property is specified in will-change

(given that [css-transforms] explicitly states that "Transforms affect the rendering of backgrounds on elements with a value of fixed for the background-attachment property"). So the current behavior of Firefox and planned behavior of Chrome are correct.

@wangxianzhu
Copy link
Author

I think SelenIT's explanation makes sense. Closing this issue.

@tabatkins tabatkins added Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-transforms-1 Current Work labels Jan 18, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 5, 2022
…rm for background-attachment:fixed, a=testonly

Automatic update from web-platform-tests
Include will-change:transform as transform for background-attachment:fixed

This is to prevent jump of background when an element with will-change:
transform changes transform from initial to non-identity. This is not in
the spec yet, so the test case is tentative with a css-transforms-1 bug
is filed at w3c/csswg-drafts#6951. Firefox
already has this behavior.

Bug: 1286593
Change-Id: I4247824b5af28613644bcd334832ff22b9483384
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3385337
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959058}

--

wpt-commits: a04b6be3ebaeea3fd79b82e9447ba1e0b864babe
wpt-pr: 32360
jamienicol pushed a commit to jamienicol/gecko that referenced this issue Feb 7, 2022
…rm for background-attachment:fixed, a=testonly

Automatic update from web-platform-tests
Include will-change:transform as transform for background-attachment:fixed

This is to prevent jump of background when an element with will-change:
transform changes transform from initial to non-identity. This is not in
the spec yet, so the test case is tentative with a css-transforms-1 bug
is filed at w3c/csswg-drafts#6951. Firefox
already has this behavior.

Bug: 1286593
Change-Id: I4247824b5af28613644bcd334832ff22b9483384
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3385337
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#959058}

--

wpt-commits: a04b6be3ebaeea3fd79b82e9447ba1e0b864babe
wpt-pr: 32360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-transforms-1 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants