[csswg-drafts] Practical guide to using will-change with currently invisible elements (#12411)

Zhang-Junzhi has just created a new issue for https://github.com/w3c/csswg-drafts:

== Practical guide to using will-change with currently invisible elements ==
[The spec](https://drafts.csswg.org/css-will-change/#using) does not explicitly encourage using `will-change` on an element that is currently invisible. For example:

```
.child {
    display: none;
    transition: translate 2s;
}

.parent:focus > .child {
    display: block;
    translate: 100px;
    @starting-style {
        translate: initial;
    }
}

.parent:hover > .child {
    will-change: translate;
}
```

I recommend the spec add use cases like this. This would imply that the browsers likely have taken `will-change` into consideration even if the element is currently invisible.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12411 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 28 June 2025 07:09:23 UTC