- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 29 Oct 2025 17:01:14 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[css-text-decor-4] Allow percentages in `text-decoration-trim` ``. <details><summary>The full IRC log of that discussion</summary> <TabAtkins> SebastianZ: plenty of use-cases regarding %s in text-deco-trim. At least animating from "none" to a specific length<br> <TabAtkins> SebastianZ: which is currently not possible with just length units<br> <TabAtkins> SebastianZ: there's some discussion about how to resolve %s<br> <TabAtkins> SebastianZ: my idea was to use the inline size of the box deco<br> <TabAtkins> TabAtkins: animating from "no decoration at all" to "some deco"?<br> <TabAtkins> SebastianZ: yes, like animating from 100% to 0%<br> <TabAtkins> SebastianZ: there was also some discussion about interaction with box-deco-break<br> <TabAtkins> SebastianZ: my idea was, if box-deco-break:clone, we'd use the inline size of that fragment<br> <TabAtkins> fantasai: if clone, do each fragment independently, if slice glue them all together and use that length.<br> <TabAtkins> fantasai: this doesn't seem crazy. one thing to point out, we use %s in several places for these props to mean a % of the font-size<br> <lea> q?<br> <TabAtkins> fantasai: is that an interpretation we'll need here instead?<br> <lea> q+<br> <TabAtkins> TabAtkins: why do we use %s for that instead of EMS?<br> <TabAtkins> fantasai: for inheritance<br> <TabAtkins> fantasai: but that might not be as needed for decors<br> <astearns> ack lea<br> <fantasai> https://www.w3.org/TR/css-text-decor-4/#text-decoration-thickness-property<br> <TabAtkins> schenney: but you might want trim to adjust as the font grows, worth thinking about<br> <fantasai> Percentages in text-decoration-thickness are relative to 1em<br> <TabAtkins> lea: not sure %s are the way here for animations. woulddn't it mean the animations would animate at different speed depending on the line?<br> <TabAtkins> fantasai: good question. this would not allow you to control the speed<br> <TabAtkins> SebastianZ: if you have 'slice', it would just be one line shared across the fragments<br> <lea> also specifying `text-decoration-trim: -100%` to mean "no underline" seems _quite_ weird<br> <TabAtkins> jfkthame: resolving %s for each fragment when 'clone' and the whole deco when 'slice' seems reasonable, but it means an animation would run different speed on different fragments, that's interesting. I might have an idea to address that. but on the whole I think this is reasonable.<br> <fantasai> It would be -50% but yeah<br> <lea> q+<br> <TabAtkins> fantasai: text-deco-thickness takes %s and they're relative to 1em<br> <jfkthame> s/might have an idea/don't have an idea/<br> <TabAtkins> fantasai: this might be a case where there are three different things and we can only do one<br> <TabAtkins> astearns: can you just use EMS?<br> <astearns> ack lea<br> <TabAtkins> fantasai: because text decors aren't inherited that might work, yeah<br> <TabAtkins> lea: an idea. if we're doing %s and it's the length of the underline... could we solve this and the previous to have text-deco-length and initial value is 100%, you can use calc() to make it slightly longer or shorter<br> <TabAtkins> SebastianZ: I initially proposed that but it was not accepted; don't remember the reasons<br> <schenney> q+<br> <TabAtkins> SebastianZ: but some people said doing inset/outset would be better for these cases<br> <astearns> ack schenney<br> <TabAtkins> lea: if we were only doing small adjustments, inset/outset makes sense, but combining here...<br> <TabAtkins> schenney: problem with a length is you can't control what side the adjustment happens on<br> <lea> and then you can even do fixed speed by animating from `text-decoration-length: 0` to `text-decoration-length: min(100%, 50em /* or whatever long enough */)`<br> <TabAtkins> schenney: I support line-length because it scales with the font size implicitly, the fragment is longer<br> <TabAtkins> fantasai: you're usually animating just a few words, and I don't think it's too useful to have the ability to trim 1% of a word...<br> <TabAtkins> fantasai: whole line underlined, sure<br> <TabAtkins> schenney: there's just not a great answer for what else to resolve a % against, I think fragment length is least bad<br> <TabAtkins> astearns: we're at time<br> <TabAtkins> astearns: interesting discussion, go thru alternatives in the issues<br> <TabAtkins> astearns: we do have a path of shipping -inset without %s to begin with, we could decide on this later<br> <TabAtkins> astearns: but given Lea's point, it might be good to get this clarified before shipping<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8403#issuecomment-3462701797 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:01:15 UTC