W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2016

[csswg-drafts] [css-text-decor] selective toggling in the text-decoration-skip property.

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Wed, 28 Dec 2016 16:23:02 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-197878744-1482942179-sysbot+gh@w3.org>
frivoal has just created a new issue for 

== [css-text-decor] selective toggling in the text-decoration-skip 
property. ==
Following up from 
 as that was a side track to the original issue.


 is a list of independent toggles, but you cannot easily add or remove
 one while keeping whatever else would be there intact.

Say I want to add `leading-spaces` and `trailing-spaces` to the 
default behavior, and put this in my author stylesheet:

:root { text-decoration-skip: objects leading-spaces trailing-spaces; 

Bam, I've just accidentally killed safari's by-default ink-skipping 
that I wasn't even aware of.

Or say I go the other way around, and like safari's by-default 
ink-skipping and add it to my author stylesheet to do the same in 
other browsers. Now if/when browsers add leading-spaces and 
trailing-spaces to the default value, I miss out.

Similarly, say I want to remove object-skipping for a particular 
element, `<del>` for example. How do I do that if I don't want to 
affect whatever else was being skipped, whether it came from default 
values, UA styles, or some other style I wrote myself?

I think the only precedent we have for this is the font-variant 
property, which is also a list of switches. If we apply the same model
 to text-decoration-skip, we'd have something like this (verbosity and
 bikesheding aside):

text-decoration-skip-objects: none | objects
text-decoration-skip-spaces: none | [leading-spaces || 
trailing-spaces] | spaces
text-decoration-skip-ink: none | ink
text-decoration-skip-edges: none | edges
text-decoration-skip-box-decoration: none | box-decoration

text-decoration-skip: none | auto |
                       objects ||
                       [ spaces | [ leading-spaces || trailing-spaces 
] ||
                       ink ||
                       edges ||

`none` sets all longhands to `none`,  `auto` is the initial value, and
 sets longhands to something smart (`object ink leading-spaces 
trailing-spaces`?), and other values are passed to through to the 
corresponding longhands and set all others longhands to none.

Alternatively, since we have no compat baggage to worry about and we 
would want authors to use these longhands to avoid the traps I 
mentioned at the beginning, maybe the shorthand should only have 
`none` and `auto`.
Actually I think I'd prefer that. Here's a possible bikesheeding:

text-decoration-skip: none | auto

text-decoration-skip-objects: none | all
text-decoration-skip-spaces: none | [leading || trailing] | all
text-decoration-skip-ink: none | all
text-decoration-skip-edges: none | all
text-decoration-skip-box-decoration: none | all

I know that's a breaking change and the spec is already in CR, but if 
you all agree it's a good idea, I wouldn't feel bad about doing it 
given the lack of implementations.

PS: the `[leading || trailing]` part could only be in level 4, but the
 rest should go in level 3 if we want to do it at all.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/843 using your GitHub 
Received on Wednesday, 28 December 2016 16:23:08 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:06 UTC