Re: [css4-text] A non-inherited property to control behavior of whitespace-only child boxes

On 03/29/2012 01:08 PM, Kang-Hao (Kenny) Lu wrote:
> 1. In a paragraph of Chinese text, 'text-space-collapse: discard;' can
> be used to drop extra spaces caused by text editors which think you can
> randomly insert spaces at an end of line in HTML.

I think you're best off running a regex that removes trailing spaces in
that case; 'discard' might remove spaces that you wanted to keep. Might
I suggest
   perl -pi -e 's/ +$//g' filename
? :)

> 2. I often write pages that mix English and Chinese. As no browsers have
> implement 'text-space' at the moment, I have to manually insert lots of
> non-semantic whitespaces between ideographs and non-ideographic letters
> to make the text more readable. Once browsers implement 'text-space:
> ideograph-alpha;', I should be able to combine 'text-space-collapse:
> discard' and some values of 'text-space' so that the spaces are dropped
> and then regenerated according to some CJK layout rules that I am not
> familiar with.

Probably we should define text-space: ideograph-alpha to replace any
collapsible spaces that are at that boundary.

> What are the other use cases? And how does U+200C matter with those?

Arabic. You want to make sure that the words don't run together; that
they are shaped independently even if the spaces are removed.


Received on Thursday, 29 March 2012 22:00:26 UTC