Open fantasai opened 1 year ago
The current direction in #6429 (with an Agenda+ to discuss) is that we allow display: none
but continue running the animation until both the animated and base display value is none.
We could do the same here. Keep the animation running as long until both the animated and base content value is none. I believe this is consistent with firefox's current behavior.
The CSS Working Group just discussed [css-content-3] Animation of 'content'
, and agreed to the following:
RESOLVED: Specify that content:none animates the same way as display:none
Currently the Animation Type of the
content
property is “discrete”. However, because thenone
value can cause the box to disappear when applied to a pseudo-element, this has similar problems todisplay: none
in keyframes, see discussion in https://github.com/w3c/csswg-drafts/issues/6429The solution we chose for
display: none
was to replace it withdisplay: revert-layer
in keyframes. But that doesn't quite work forcontent
for two reasons:content: none
on regular elements does not delete the box, only its contents, so it's not necessary to limit itcontent: normal
on certain pseudo-elements computes tonone
, so it needs to be limited also.Possible options I can think of, none of which seem amazing...
none
andnormal
are excluded from keyframes, and are converted torevert-layer
.none
in an animation or transition frame (i.e. that originated in either the Animations or Transitions cascade origins) is converted to""
.none
in a keyframe is converted to""
only on the::before
/::after
pseudo-elements.content
Not Animatable.