Re: [csswg-drafts] [css-text-decor] Feature request - add a property text-decoration-length that modifies the length of the underline (#4557)

> On block containers, applies to both sides of each line. Percentages refer to the width of the containing block.

Referring to the width of the containing block seems wrong to me as the decorations don't extend to that width. So decorations and their trimming would be disconnected.
I'd say, percentages should rather refer to the width of each fragment of the decoration box. By that, each line's decoration would be trimmed by the same percentage.

Alternatively, percentages could refer to the total length of the untrimmed line decoration of the in-flow inline-level children. That means, the percentage would affect the total length of the line across the fragments. So, basically what you've defined for inline elements.
Though it's probably good to specify different behavior for both, so authors can choose between two stylistic behaviors.

> * Have inlines also apply this per-fragment instead of per-element?

I'd say no. See my last sentence for the reasoning.

> * Call it `text-decoration-trim` or `text-decoration-inset`?

Both names seem valid to me for positive values. Though for negative values (actually extending the decorations) they both miss the point.

> * If percentages are used to represent the length of the line, how do we represent its thickness?

Do you mean how to refer to the thickness of the line when trimming it? If so, what are the use cases for that?

Sebastian

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


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

Received on Wednesday, 4 May 2022 21:22:34 UTC