Re: [csswg-drafts] [css-text-decor-4] Allow percentages in `text-decoration-trim` (#8403)

> You want to animate with a constant speed for each line (when `text-decoration-break` is `clone`)? You _also_ can!
> 
> @keyframes underline-grow {
>  from { text-decoration-length: 0 }
>  to { text-decoration-length: min(100%, 100cqw) }
> }
> 
> .foo {
>  animation: underline-grow 1s both;
> }

It may just be my lack of understanding, but I don't see how this gives constant-speed animation if a decorated element is broken into two fragments with quite different widths. The `100%` will resolve to different lengths for each fragment, and so the animation will grow at different speeds such that they each reach 100% after 1s, no? Or are there some other rules for how this works?

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


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

Received on Wednesday, 29 October 2025 17:42:57 UTC