Skip to content
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-backgrounds] background-image should be animatable #578

Open
alancutter opened this issue Oct 7, 2016 · 2 comments
Open

[css-backgrounds] background-image should be animatable #578

alancutter opened this issue Oct 7, 2016 · 2 comments

Comments

@alancutter
Copy link
Contributor

https://drafts.csswg.org/css-backgrounds-3/#the-background-image defines background-image to be not animatable (though browsers animate some values of it anyway).

cross-fade() is defined in https://drafts.csswg.org/css-images-3/#cross-fade-function which can be used to interpolate between different image values. It would make sense to define animation of background-image in terms of this function.

@HT-7
Copy link

HT-7 commented Apr 19, 2020

Also, make sure that the smooth transition of linear gradients is supported.

@SebastianZ
Copy link
Contributor

SebastianZ commented Apr 20, 2020

Also, make sure that the smooth transition of linear gradients is supported.

That is already possible by using custom properties. See https://css-houdini.rocks/animating-gradient/.
Additionally to that, there is a discussion in #3783 covering the animation of gradients (without having to define custom properties).

cross-fade() is defined in https://drafts.csswg.org/css-images-3/#cross-fade-function which can be used to interpolate between different image values. It would make sense to define animation of background-image in terms of this function.

For the note, cross-fade() was postponed to CSS Images 4.

Though I think the definition in CSS Backgrounds 3 of background-image being animatable should refer to the definition of interpolations in CSS Images 3 (which basically says the same, images are only discretely animatable).
In CSS Backgrounds 4 the definition should then refer to the definition of image transitions in CSS Images 4, which specifies smooth transitions between them.

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants