4 ms·
I found a probably unintended use in making it easy to ensure clipping worked right. The intended use of course is ensuring that the content in container does
by p_l 2y ago
I found a probably unintended use in making it easy to ensure clipping worked right.
The intended use of course is ensuring that the content in container does not need complex compositing outside its rectangle.
- aabhay 2y agoThis optimization is pretty massive if used right. It means that you can draw this component directly on the pixel buffer of its parent instead of on a separate buffer of growable size that needs to then be copied over. Or if the browser renders things in order (to maintain a single buffer), this operation could be safely parallelized.
- webstrand 2y agoa fun fact, `contain: paint` dosn't contain box-shadow or filters like drop-shadow or blur, so that's not strictly true.
- have_faith 2y agoSo text won’t visually bleed out but the texts box shadow still will? I’m guessing there’s a reason to why this is but it’s a bit strange.