Re: [csswg-drafts] [css-text-4] Rethinking 'text-space-collapse' and 'text-space-trim'

> I believe all values of text-space-trim should have similar names, either all with the prefix trim- or all with discard- (following text-space-collapse's wording).

Fair point. :) Leaning towards `discard-` to match the `text-space-collapse` value, anything else to consider?

> What about the renaming? discard doesn't fit perfectly to text-space-collapse, which only indicates collapsing, not completely discarding.

If we end up preserving the line-breaking opportunities, then it's a type of collapsing really. Note that newlines collapse to nothing in CJK contexts, for example. Also I don't have a better name.

> As white-space is meant to be a shorthand for them, they should rather have that as prefix.

There was some historical issue about not having the same name as an XSL:FO property. If that's no longer relevant, we could use `white-space-collapse`, sure.

> Last point, my proposal included a keyword discard for text-space-trim combining discard-before and discard-after, as that's probably more common than only applying it to one side.

Actually one of the major use cases was inline notes like footnotes, which would warrant `discard-before`. E.g. suppose we had this markup: `Here's a word <note>This is a note on the word.</note> in a sentence.` If the note stays inline, we add parentheses and leave it with the white space. But if layout mechanism that pulls the note out of flow and leaves behind a marker, we want to delete the space between “word” and that marker -- but not the space after. I suppose we could add a `discard-around` keyword, though. What are the use cases you had in mind?


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

Received on Thursday, 13 September 2018 22:23:08 UTC