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

> In this model, how do you inset (or outset) one end of the line independently of the other?

I don't think you can (except perhaps through another property to offset). Are there use cases that need this? Do other models allow this?

> > You want to animate with a constant speed for each line (when `text-decoration-break` is `clone`)? You _also_ can!
> > [@Keyframes](https://github.com/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?

Good catch! Just updated the example.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8403#issuecomment-3463544176 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 19:41:15 UTC