10BC0 [css-content-3] Animation of 'content' · Issue #8623 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-content-3] Animation of 'content' #8623

@fantasai

Description

@fantasai

Currently the Animation Type of the content property is “discrete”. However, because the none value can cause the box to disappear when applied to a pseudo-element, this has similar problems to display: none in keyframes, see discussion in #6429

The solution we chose for display: none was to replace it with display: revert-layer in keyframes. But that doesn't quite work for content for two reasons:

  • content: none on regular elements does not delete the box, only its contents, so it's not necessary to limit it
  • content: normal on certain pseudo-elements computes to none, so it needs to be limited also.

Possible options I can think of, none of which seem amazing...

  • Both none and normal are excluded from keyframes, and are converted to revert-layer.
  • A computed value of none in an animation or transition frame (i.e. that originated in either the Animations or Transitions cascade origins) is converted to "".
  • A computed value of none in a keyframe is converted to "" only on the ::before/::after pseudo-elements.
  • We make content Not Animatable.
  • Something else?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0