You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Besides the general discussion in #4557 to introduce a way to modify the length of the decoration, there was also some discussion around how to call the property. As I previously summarized, name suggestions for it so far were:
text-decoration-trim
text-decoration-inset
text-decoration-limit
text-decoration-clip
As there are also use cases for extending the decorations beyond their normal size. In my opinion, "trim" doesn't express that well enough. Therefore I slightly tend towards "limit".
We're in the process of implementing this, so if there's going to be some naming bikeshedding, we'd appreciate it happening sooner rather than later.
(Personally, I'm happy with text-decoration-trim; the idea that "negative trimming" extends the line doesn't bother me. Neither -limit nor -clip seem nearly as clear; -inset would be OK but no better than -trim.)
Reacted by Florian Rivoal, Sebastian Zartner and fantasai
I'd argue that *-inset is definitely better than *-trim and would also be more conform with other properties like view-timeline-inset or inset-*.
All the other properties that have "trim" in their name like white-space-trim, text-box-trim, margin-trim, etc. are keyword-based. And trim rather indicates cutting off something rather than potentially expanding it. Therefore I am strongly against using *-trim and *-clip and prefer either *-inset or *-limit.
Thinking about this again, I'm feeling less in favor of -inset here. Not sure how well I can articulate this, but fwiw....
To my mind, inset properties are about adjusting their target element in relation to another element (a parent or containing box). Given an element that is being sized or placed within an area that has been defined by some external thing, it makes sense to have the ability to "inset" (or expand, by use of negative inset) that area.
But with decoration lines, it's not readily apparent to an author that there is any such "container" to apply insets to. The decoration line seems more like an attribute of a range of text, and its length is determined by the length of that text, not in relation to some containing element, so the idea of "insetting" from such a container is a little odd.
Arguably the inline element (or pseudo, e.g. ::selection) that defines the decorating line could be considered that container, and the spec talks of the "decorating box", so insets can reasonably be applied to that box, but I don't think this is a model that will generally be at the front of an author's mind. To an author, a decorating line is an independent thing that simply appears below (or above) a range of text. The property under discussion here directly adjusts the length of that line, by "trimming" a certain amount from each end, not by "insetting" it from a containing area.
(As for negative values, a negative "trim" extends and a negative "inset" expands; these seem equally reasonable concepts to me.)
Not necessarily saying that those are any better than the previous options.
To my mind, inset properties are about adjusting their target element in relation to another element (a parent or containing box). Given an element that is being sized or placed within an area that has been defined by some external thing, it makes sense to have the ability to "inset" (or expand, by use of negative inset) that area.
But with decoration lines, it's not readily apparent to an author that there is any such "container" to apply insets to. The decoration line seems more like an attribute of a range of text, and its length is determined by the length of that text, not in relation to some containing element, so the idea of "insetting" from such a container is a little odd.
"Insetting" to me means relative to something, not necessarily a containing element. Though I can see your point. The existing *-inset-* properties we have are also related to some containing element.
Having said that, I still believe "limit", "inset" and possibly also "(length-)adjust" express the meaning better than words in the meaning of cutting off or taking away something.
Though I am not a native speaker. And so far there were only a few opinions expressed. Maybe someone could set up a quick naming poll somewhere to reach a broader audience, maybe @mirisuzanne or @jensimmons? (I'm not on the big messaging/social media platforms, so can't do that myself, unfortunately.)
I don't have strong feelings here, text-decoration-trim seems ok to me. *-edge might also be an option?
I'm happy to share a poll – but Mastodon only allows 4 options, and Bluesky doesn't have built-in polling at all. We could try an emoji poll here instead, and link from social media posts?
There's something similar here with the column-rule properties that @kbabbitt has been working to spec in https://www.w3.org/TR/css-gaps-1/#outset ... They're using *-rule-outset. Maybe text-decoration-outset would work here? Keeping them consistent seems like a good plan in any case.
Gap Decorations does use outsets right now, though in #12848 I'm contemplating flipping them to insets.
For the property we're discussing here, which do we expect to be the more common use case - extending or shrinking? Depending on the answer to that, I'd prefer either outset or inset respectively, such that positive values would reflect the more common case. I would prefer either of those over trim for the reasons @SebastianZ gave. I don't like adjust because that's not clear on which is the positive-value direction, or even what's being adjusted - I could see it being confused for adjustment up or down from the text baseline, for example.
Reacted by Sebastian Zartner, Miriam Suzanne and Michaël Vanderheyden
For the property we're discussing here, which do we expect to be the more common use case - extending or shrinking?
From my experience, shrinking is much more common than extending. See the examples I linked to in #8403.
I don't like adjust because that's not clear on which is the positive-value direction, or even what's being adjusted - I could see it being confused for adjustment up or down from the text baseline, for example.
Therefore, I also provided a text-decoration-{size|length}-adjust option. But I admit, it's a bit lengthy.
@oddbird Yeah, the cap shape idea does open up the idea of custom start/end terminals like ball, square, arrowheads, and wanting size/scale them independent of -thickness.
I wasn't thinking about combing a shape with a value (round 10px), but I see what you mean about the cascade and shorthand in that approach.
Just for the record, CSS already inherits the term cap from SVG for the stroke-linecap property in the Fill & Stroke Module. (The hyphen one would expect therein is missing in fact just because.)
For what it’s worth, CSS Fonts always abbreviates plural ”capitals“ as caps in its property names and keyword values, but the related unit in CSS Values is called cap, as is the respective keyword for line-fit-edge in CSS Inline.
I'm a bit disappointed that the existing name column-rule-outset wasn't included in the poll. Though I suppose text-decoration-outset and text-underline-offset are maybe too close together? Still, would have been nice to see how people react to it.
I'm also still a bit concerned that inset, as @jfkthame mentioned, is associated with layout properties that move things around (rather than trimming them)...
In my opinion, -outset has the same drawback as -inset, that it sounds like it could be affecting layout and not merely rendering; but in addition, it would have us using negative values for the common case, at least in the case of text-decoration (I'm not sure which way the balance is likely to lie for column-rule). I also think "outset" is less familiar in general as an everyday word/concept than "inset".
While I personally still like -trim, I think the overall preference for -inset seen in #8402 (comment) is pretty clear, so I'm suggesting we should resolve on that; I'm not sure there's much more useful discussion to be had at this point.
The CSS Working Group just discussed [css-text-decor-4] Consider renaming `text-decoration-trim` , and agreed to the following:
RESOLVED: name this (and gap-deco props) with -inset
The full IRC log of that discussion
<TabAtkins> SebastianZ: last call, we were already discussing this and decided to create a poll
<TabAtkins> SebastianZ: it looks like the poll settled on text-decoration-inset
<TabAtkins> SebastianZ: there were still some discussions around that name being perfect, tho
<TabAtkins> SebastianZ: there was also a suggestion to add text-dec-cap property
<lea> q+
<TabAtkins> SebastianZ: might not cover the use-case of trimming/expanding decorations, but influencing how it looks in the end, how the edges are capped
<astearns> ack lea
<TabAtkins> lea: what's the value space? a length or an offset?
<TabAtkins> fantasai: a length
<TabAtkins> jfkthame: I'd like to suggest we resolve on -inset per the poll, and make the corresponding change to the gap decorations property to match
<kbabbitt> q+
<TabAtkins> SebastianZ: we were going to change the decorations too?
<lea> q+
<TabAtkins> fantasai: yes, I wanted them in the poll since we'd be changing them too
<astearns> ack kbabbitt
<TabAtkins> SebastianZ: I mentioned them in the post at least
<TabAtkins> kbabbitt: wrt gap-deco, I used -outset for a few reasons about behavior
<astearns> also not a fan of 'outset'
<TabAtkins> kbabbitt: I don't super like outset, it's less common then -inset
<TabAtkins> kbabbitt: but since the predominant use-case is to shorten rather than lengthen, I think -inset makes more sense
<astearns> ack lea
<schenney> q+
<dbaron> IMO -inset versus -outset naming implies which direction positive numbers go and which direction negative numbers go!
<fantasai> yes
<TabAtkins> lea: one of my issues with these is they imply the adjustment goes a certain direction, reducing the length, but they can also increase. trim, limit, cap all reduce
<fantasai> but we can flip them around depending on the name, that's ifne
<TabAtkins> lea: in some ways length-adjust would be ideal but too long
<kbabbitt> +1 dbaron
<TabAtkins> jfkthame: length-adjust doesn't tell you which direction you're adjusting it
<astearns> ack schenney
<astearns> ack dbaron
<TabAtkins> schenney: regarding cap, might be worth allowing a reference to a path so you can adjust more than just the cap. so i'm inclined to defer that until a later proposal
<TabAtkins> dbaron: [restates what they said in IRC]
<TabAtkins> dbaron: there's other names where it's not clear which way is which
<lea> q?
<TabAtkins> lea: someone proposed -spread which is interesting, but didn't get votes
<TabAtkins> jfkthame: sounds like it would imply a blur or thickening...
<TabAtkins> lea: how does this affect skip-ink?
<noamr> text-decoration-adjust ?
<TabAtkins> jfkthame: it doesn't, skipping happens in the adjusted line
<JoshT> q+
<dbaron> s/[restates what they said in IRC]/I'd expect text-decoration-inset to mean positive numbers make the line shorter and negative numbers make the line longer; I'd expect text-decoration-outside to mean the reverse/
<TabAtkins> astearns: so all these options have drawbacks, but I think we could resolve on -inset. seems like the least worst option and has some proponents
<astearns> ack JoshT
<TabAtkins> JoshT: curve ball, did we discuss making it similar to box-shadow? where you specify inset keyword to make it inset?
<TabAtkins> fantasai: I think negative vs positive covers this. box-shadow doesn't have that, insets are qualitatively different than outset shadows
<TabAtkins> fantasai: personally I prefer outset, growing feels more natural to me. but I don't have an objection. disappointed outset wasn't in the poll
<TabAtkins> lea: there's been a lot of polls, don't have a great overall feel for what's voted on
<TabAtkins> astearns: chair hat off, i'd dislike outset. not a common word, and weird to have this one place we use outset
<TabAtkins> TabAtkins: I think we should try to resolve as jfkthame said, taking the poll winner
<TabAtkins> proposed resolution: name this (and gap-deco props) with -inset
<kbabbitt> +1
<TabAtkins> astearns: objections?
<TabAtkins> RESOLVED: name this (and gap-deco props) with -inset
Activity
jfkthame commentedon Aug 8, 2025
We're in the process of implementing this, so if there's going to be some naming bikeshedding, we'd appreciate it happening sooner rather than later.
(Personally, I'm happy with
text-decoration-trim; the idea that "negative trimming" extends the line doesn't bother me. Neither-limitnor-clipseem nearly as clear;-insetwould be OK but no better than-trim.)SebastianZ commentedon Oct 14, 2025
I'd argue that
*-insetis definitely better than*-trimand would also be more conform with other properties likeview-timeline-insetorinset-*.All the other properties that have "trim" in their name like
white-space-trim,text-box-trim,margin-trim, etc. are keyword-based. Andtrimrather indicates cutting off something rather than potentially expanding it. Therefore I am strongly against using*-trimand*-clipand prefer either*-insetor*-limit.Sebastian
jfkthame commentedon Oct 14, 2025
Thinking about this again, I'm feeling less in favor of
-insethere. Not sure how well I can articulate this, but fwiw....To my mind,
insetproperties are about adjusting their target element in relation to another element (a parent or containing box). Given an element that is being sized or placed within an area that has been defined by some external thing, it makes sense to have the ability to "inset" (or expand, by use of negative inset) that area.But with decoration lines, it's not readily apparent to an author that there is any such "container" to apply insets to. The decoration line seems more like an attribute of a range of text, and its length is determined by the length of that text, not in relation to some containing element, so the idea of "insetting" from such a container is a little odd.
Arguably the inline element (or pseudo, e.g.
::selection) that defines the decorating line could be considered that container, and the spec talks of the "decorating box", so insets can reasonably be applied to that box, but I don't think this is a model that will generally be at the front of an author's mind. To an author, a decorating line is an independent thing that simply appears below (or above) a range of text. The property under discussion here directly adjusts the length of that line, by "trimming" a certain amount from each end, not by "insetting" it from a containing area.(As for negative values, a negative "trim" extends and a negative "inset" expands; these seem equally reasonable concepts to me.)
SebastianZ commentedon Oct 14, 2025
Just to throw in some more alternatives:
text-decoration-adjusttext-decoration-{size|length}-adjusttext-decoration-resizeNot necessarily saying that those are any better than the previous options.
"Insetting" to me means relative to something, not necessarily a containing element. Though I can see your point. The existing
*-inset-*properties we have are also related to some containing element.Having said that, I still believe "limit", "inset" and possibly also "(length-)adjust" express the meaning better than words in the meaning of cutting off or taking away something.
Though I am not a native speaker. And so far there were only a few opinions expressed. Maybe someone could set up a quick naming poll somewhere to reach a broader audience, maybe @mirisuzanne or @jensimmons? (I'm not on the big messaging/social media platforms, so can't do that myself, unfortunately.)
Sebastian
mirisuzanne commentedon Oct 14, 2025
I don't have strong feelings here,
text-decoration-trimseems ok to me.*-edgemight also be an option?I'm happy to share a poll – but Mastodon only allows 4 options, and Bluesky doesn't have built-in polling at all. We could try an emoji poll here instead, and link from social media posts?
fantasai commentedon Oct 14, 2025
There's something similar here with the
column-ruleproperties that @kbabbitt has been working to spec in https://www.w3.org/TR/css-gaps-1/#outset ... They're using*-rule-outset. Maybetext-decoration-outsetwould work here? Keeping them consistent seems like a good plan in any case.kbabbitt commentedon Oct 14, 2025
Gap Decorations does use outsets right now, though in #12848 I'm contemplating flipping them to insets.
For the property we're discussing here, which do we expect to be the more common use case - extending or shrinking? Depending on the answer to that, I'd prefer either
outsetorinsetrespectively, such that positive values would reflect the more common case. I would prefer either of those overtrimfor the reasons @SebastianZ gave. I don't likeadjustbecause that's not clear on which is the positive-value direction, or even what's being adjusted - I could see it being confused for adjustment up or down from the text baseline, for example.SebastianZ commentedon Oct 14, 2025
From my experience, shrinking is much more common than extending. See the examples I linked to in #8403.
Therefore, I also provided a
text-decoration-{size|length}-adjustoption. But I admit, it's a bit lengthy.Sebastian
SebastianZ commentedon Oct 15, 2025
20 remaining items
rianmurnen commentedon Oct 16, 2025
@oddbird Yeah, the cap shape idea does open up the idea of custom start/end terminals like ball, square, arrowheads, and wanting size/scale them independent of
-thickness.I wasn't thinking about combing a shape with a value (round 10px), but I see what you mean about the cascade and shorthand in that approach.
Crissov commentedon Oct 17, 2025
Just for the record, CSS already inherits the term cap from SVG for the
stroke-linecapproperty in the Fill & Stroke Module. (The hyphen one would expect therein is missing in fact just because.)For what it’s worth, CSS Fonts always abbreviates plural ”capitals“ as
capsin its property names and keyword values, but the related unit in CSS Values is calledcap, as is the respective keyword forline-fit-edgein CSS Inline.fantasai commentedon Oct 21, 2025
I'm a bit disappointed that the existing name
column-rule-outsetwasn't included in the poll. Though I supposetext-decoration-outsetandtext-underline-offsetare maybe too close together? Still, would have been nice to see how people react to it.I'm also still a bit concerned that
inset, as @jfkthame mentioned, is associated with layout properties that move things around (rather than trimming them)...jfkthame commentedon Oct 21, 2025
In my opinion,
-outsethas the same drawback as-inset, that it sounds like it could be affecting layout and not merely rendering; but in addition, it would have us using negative values for the common case, at least in the case of text-decoration (I'm not sure which way the balance is likely to lie for column-rule). I also think "outset" is less familiar in general as an everyday word/concept than "inset".While I personally still like
-trim, I think the overall preference for-insetseen in #8402 (comment) is pretty clear, so I'm suggesting we should resolve on that; I'm not sure there's much more useful discussion to be had at this point.mirisuzanne commentedon Oct 22, 2025
inset()is also a basic shape, which is used for rendering concerns, not for layout. I disagree that these terms are somehow layout-specific.css-meeting-bot commentedon Oct 29, 2025
The CSS Working Group just discussed
[css-text-decor-4] Consider renaming `text-decoration-trim`, and agreed to the following:RESOLVED: name this (and gap-deco props) with -insetThe full IRC log of that discussion
<TabAtkins> SebastianZ: last call, we were already discussing this and decided to create a poll<TabAtkins> SebastianZ: it looks like the poll settled on text-decoration-inset
<TabAtkins> SebastianZ: there were still some discussions around that name being perfect, tho
<TabAtkins> SebastianZ: there was also a suggestion to add text-dec-cap property
<lea> q+
<TabAtkins> SebastianZ: might not cover the use-case of trimming/expanding decorations, but influencing how it looks in the end, how the edges are capped
<astearns> ack lea
<TabAtkins> lea: what's the value space? a length or an offset?
<TabAtkins> fantasai: a length
<TabAtkins> jfkthame: I'd like to suggest we resolve on -inset per the poll, and make the corresponding change to the gap decorations property to match
<kbabbitt> q+
<TabAtkins> SebastianZ: we were going to change the decorations too?
<lea> q+
<TabAtkins> fantasai: yes, I wanted them in the poll since we'd be changing them too
<astearns> ack kbabbitt
<TabAtkins> SebastianZ: I mentioned them in the post at least
<TabAtkins> kbabbitt: wrt gap-deco, I used -outset for a few reasons about behavior
<astearns> also not a fan of 'outset'
<TabAtkins> kbabbitt: I don't super like outset, it's less common then -inset
<TabAtkins> kbabbitt: but since the predominant use-case is to shorten rather than lengthen, I think -inset makes more sense
<astearns> ack lea
<schenney> q+
<dbaron> IMO -inset versus -outset naming implies which direction positive numbers go and which direction negative numbers go!
<fantasai> yes
<TabAtkins> lea: one of my issues with these is they imply the adjustment goes a certain direction, reducing the length, but they can also increase. trim, limit, cap all reduce
<fantasai> but we can flip them around depending on the name, that's ifne
<TabAtkins> lea: in some ways length-adjust would be ideal but too long
<kbabbitt> +1 dbaron
<TabAtkins> jfkthame: length-adjust doesn't tell you which direction you're adjusting it
<astearns> ack schenney
<astearns> ack dbaron
<TabAtkins> schenney: regarding cap, might be worth allowing a reference to a path so you can adjust more than just the cap. so i'm inclined to defer that until a later proposal
<TabAtkins> dbaron: [restates what they said in IRC]
<TabAtkins> dbaron: there's other names where it's not clear which way is which
<lea> q?
<TabAtkins> lea: someone proposed -spread which is interesting, but didn't get votes
<TabAtkins> jfkthame: sounds like it would imply a blur or thickening...
<TabAtkins> lea: how does this affect skip-ink?
<noamr> text-decoration-adjust ?
<TabAtkins> jfkthame: it doesn't, skipping happens in the adjusted line
<JoshT> q+
<dbaron> s/[restates what they said in IRC]/I'd expect text-decoration-inset to mean positive numbers make the line shorter and negative numbers make the line longer; I'd expect text-decoration-outside to mean the reverse/
<TabAtkins> astearns: so all these options have drawbacks, but I think we could resolve on -inset. seems like the least worst option and has some proponents
<astearns> ack JoshT
<TabAtkins> JoshT: curve ball, did we discuss making it similar to box-shadow? where you specify inset keyword to make it inset?
<TabAtkins> fantasai: I think negative vs positive covers this. box-shadow doesn't have that, insets are qualitatively different than outset shadows
<TabAtkins> fantasai: personally I prefer outset, growing feels more natural to me. but I don't have an objection. disappointed outset wasn't in the poll
<TabAtkins> lea: there's been a lot of polls, don't have a great overall feel for what's voted on
<TabAtkins> astearns: chair hat off, i'd dislike outset. not a common word, and weird to have this one place we use outset
<TabAtkins> TabAtkins: I think we should try to resolve as jfkthame said, taking the poll winner
<TabAtkins> proposed resolution: name this (and gap-deco props) with -inset
<kbabbitt> +1
<TabAtkins> astearns: objections?
<TabAtkins> RESOLVED: name this (and gap-deco props) with -inset
SebastianZ commentedon Nov 11, 2025
The CSS Text Decorations part just got merged. #13024 targets the CSS Gap Decorations part.
Sebastian
[css-gaps-1] Update `outset` properties #12603, #12848, #8402 (#13024)
jav099 commentedon Dec 17, 2025
The CSS Gap Decorations part just merged, should this now be marked as closed?
SebastianZ commentedon Dec 18, 2025
Yes, I think so. Thanks for the change, @jav099!
Sebastian