Re: [csswg-drafts] [css-text-decor] How to use decoration skipping to turn off underlines? (#2885)

The CSS Working Group just discussed `using decoration-skipping to turn off underlines`, and agreed to the following:

* `RESOLVED: Add text-decoration-skip-self as a longhand of text-decoration-skip, for skipping ancestor decorations.`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: using decoration-skipping to turn off underlines<br>
&lt;TabAtkins> github: https://github.com/w3c/csswg-drafts/issues/2885<br>
&lt;TabAtkins> fantasai: We've had a variety of suggestions for how to turn off ancestor underlines on an element<br>
&lt;TabAtkins> fantasai: We had a suggestion of using text-decoration-skip; it didn't work since it was inheriting<br>
&lt;TabAtkins> fantasai: that doesn't work<br>
&lt;TabAtkins> fantasai: My suggestion is to add text-decoration-skip-self: auto | skip | no-skip<br>
&lt;TabAtkins> fantasai: could add no-skip later if needed<br>
&lt;TabAtkins> fantasai: non-inherited property<br>
&lt;TabAtkins> fantasai: auto skips if it's atomic inline<br>
&lt;TabAtkins> fantasai: skip skips the element regardless<br>
&lt;TabAtkins> fantasai: no-skip avoids skipping even if it's atomic inline; draw it over/under as if it's a character<br>
&lt;TabAtkins> fantasai: useful when images are used as text, like in CJK for rare characters<br>
&lt;TabAtkins> fantasai: not ideal but it happens<br>
&lt;TabAtkins> fantasai: skip would apply to inlines; all ancestor decorations would skip, but its own text decorations would apply<br>
&lt;emilio> q+<br>
&lt;TabAtkins> astearns: This is in addition to the skipping we already have?<br>
&lt;TabAtkins> fantasai: this replaces the existing text-decoration-skip:self<br>
&lt;TabAtkins> fantasai: independent from ink skipping<br>
&lt;TabAtkins> emilio: Is the auto beahvior how browsers behave today?<br>
&lt;TabAtkins> fantasai: yes<br>
&lt;TabAtkins> emilio: sounds reasonable<br>
&lt;astearns> ack emilio<br>
&lt;TabAtkins> astearns: how does it interact with text-decoration-skip?<br>
&lt;TabAtkins> astearns: assume not a shorthand relationship<br>
&lt;TabAtkins> fantasai: We've discussed having a shorthand for both inherited and non<br>
&lt;TabAtkins> fantasai: several places in TExt where it might be useful<br>
&lt;TabAtkins> fantasai: but haven't pulled the trigger yet<br>
&lt;TabAtkins> fantasai: for here it's less critical, but i think it's useful for text-decoration-skip to be a shorthand<br>
&lt;TabAtkins> fantasai: there was also some white space property where we thought about mixing inherited and non<br>
&lt;TabAtkins> emilio: Don't we already ahve one mixed?<br>
&lt;TabAtkins> emilio: border-color? i guess that doesn't inherit<br>
&lt;TabAtkins> fantasai: I think we ahd a proposal for one, but we never solidified it<br>
&lt;TabAtkins> florian: there was something but we changed it to have a special value that mimics non-inheritance<br>
&lt;astearns> s/florian/fremy/<br>
&lt;TabAtkins> fantasai: my suggestion is we make text-decoration-skip a shorthand for all the skip props<br>
&lt;TabAtkins> fantasai: we might need to make the keywords more unique, then<br>
&lt;TabAtkins> jfkthame: do you want to control skipping separately for the different decorations?<br>
&lt;TabAtkins> jfkthame: Like skip underlines on sub elements, but not overlines<br>
&lt;TabAtkins> fantasai: yeah<br>
&lt;TabAtkins> +1<br>
&lt;TabAtkins> astearns: If an author wanted it, would they be able to skip everything and reset the others?<br>
&lt;TabAtkins> jfkthame: No, if you reset on the child they'll move to match the child rather than being continuous<br>
&lt;TabAtkins> emilio: the 'all' trivially does inherited and non-inherited<br>
&lt;TabAtkins> TabAtkins: lol yeah but it's a special case<br>
&lt;dbaron> At least the old Gecko style system (and maybe other engines) had optimizations (in the rule tree) that benefited from shorthands (for many common shorthands) being all-inherited or all-non-inherited.<br>
&lt;TabAtkins> fantasai: so maybe we want skip-all, skip-underline, etc<br>
&lt;TabAtkins> astearns: maybe we could add the specific values when we have use-cases? jonathan, do you know it's something we want to do right now?<br>
&lt;TabAtkins> jfkthame: No haven't been hearing much demand, just seemed like a natural request<br>
&lt;TabAtkins> fantasai: It's good to bring up, as it can affect our naming<br>
&lt;TabAtkins> astearns: maybe goes back to Myles since he brought it up, to see if it's something he wants to design<br>
&lt;dbaron> (Are there people who want text-decoration-skip-ink to apply to line-through decorations?)<br>
&lt;TabAtkins> fantasai: I think we're resolved to add a non-inherited property (a longhand of t-d-skip) that skips t-ds imposed by an ancestor<br>
&lt;TabAtkins> fantasai: open questio is whether we add keywords for the specific types of decorations<br>
&lt;TabAtkins> dbaron: wondering about separate decorations...<br>
&lt;TabAtkins> dbaron: we had people asking for skipping for strike-thrus<br>
&lt;fantasai> s/we had/have we had/<br>
&lt;TabAtkins> fantasai: currently we ink-skip on under and overlines, not linethrus, since it should look like you're striking the text<br>
&lt;fantasai> fantasai: I haven't heard sucha request<br>
&lt;fantasai> ^<br>
&lt;TabAtkins> astearns: OPinions or concerns?<br>
&lt;TabAtkins> astearns: so proposed resolution is to add the new prop as a longhand of t-d-skip<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: Add text-decoration-skip-self as a longhand of text-decoration-skip, for skipping ancestor decorations.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2885#issuecomment-1201529088 using your GitHub account


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

Received on Monday, 1 August 2022 17:58:37 UTC