Re: [csswg-drafts] [css-contain-2] content-visibility should pause css animations in subtree (#5611)

> > and any internal freshening of style would not be observable so doesn't need to be spec'd.
> 
> Is this because we wouldn't fire the animation events? If we create animations and whatnot, it would be observable indirectly

Animations would not be created. We would only do this when a style update is developer forced or the content becomes visible.
> 
> > and style is not updated in content-visibility: hidden subtrees
> 
> I think this is a problematic thing to put in because style needs to be updated in a whole bunch of situations under a content-visibility: hidden. I don't remember off the top of my head if any of them are in document lifecycle (in Blink) though. This would, however, move content-visibility from being a largely a strong hint which can be used for optimization and become a requirement that style optimization occurs in specific scenarios

content-visibility is going to have some requirements in order to not be observable. Perhaps if you replace style updates with animation updates in my above statement it sounds less onerous? I.e. the browser can feel free to update style as frequently as it wants, and it should ensure that animations are updated when the developer requests the style of elements.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5611#issuecomment-712866630 using your GitHub account


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

Received on Tuesday, 20 October 2020 13:52:05 UTC