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-will-change] new property will-change-to #10330

Open
Zhang-Junzhi opened this issue May 14, 2024 · 0 comments
Open

[css-will-change] new property will-change-to #10330

Zhang-Junzhi opened this issue May 14, 2024 · 0 comments

Comments

@Zhang-Junzhi
Copy link
Contributor

Zhang-Junzhi commented May 14, 2024

I would like to suggest a new property will-change-to.

This is useful for some cases, for example, for preloading various external resources in an elegant pure CSS way:

html
{
    background-image: url(a);
    will-change-to: background-image, url(a), url(b), url(c);
}

html.theme-b
{
    background-image: url(b);
}

html.theme-c
{
    background-image: url(c);
}

This is just a simple example, and I have no idea of a specific format for multiple property support.

This new suggested will-change-to property can be seen as a version of will-change with specific property values added. There is also a difference between them: will-change signifies that the listed properties are constantly changing, while 'will-change-to' doesn't.

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

No branches or pull requests

1 participant