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! ...

> Good catch! Just updated the example.

I still don't see how that works. The new version:
```
@property --text-decoration-max-length {
 syntax: "<length-percentage>";
 inherits: false;
 initial-value: 0px;
}

@keyframes underline-grow {
 to { --text-decoration-max-length: 100cqw }
}

.foo {
 animation: underline-grow 1s both;
 text-decoration-length: max(100%, var(--text-decoration-max-length);
}
```
looks to me like it would grow the underline to the full width of `100cqw`, regardless of the length of the fragment being underlined, which is not the intended result.

-- 
GitHub Notification of comment by jfkthame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8403#issuecomment-3464104086 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 21:20:09 UTC