Open ebidel opened 8 years ago
what about if you do both? Because for older browsers you will need the fallback?
@paulirish
2) correct but in your css you will still have set both if you want to support more than 1 browser. Do we punish them for it or just give them feedback that they need to add will-change as well. 3) is pretty nice to know :p 4) Position fixed offers a really bad experience on mobile (ios)...
Something like this? 1) look for translateZ -> do we also have will-change (it's ok) 2) if only translateZ warn user for layer promotion? 3) if they do animation and have translateZ or translate3d but no will-change warn them?
...you will still have set both if you want to support more than 1 browser.
2) aye. if they're already using translateZ or 3d, they might as well add will-change to it. So that's probably rule #2. :)
proposed approach:
transform
, opacity
, or filter
.
will-change
and looking for improvement
Best I've come up with:
transition
property is used but nowill-change
property is found in the same selector.will-change
instead oftranslateZ(0)
usageShould also be clear in the helpText that developers should not will-change all the things!
https://developer.mozilla.org/en-US/docs/Web/CSS/will-change