W3C home > Mailing lists > Public > www-style@w3.org > March 2012

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 29 Mar 2012 14:59:56 -0700
Message-ID: <4F74DB5C.6060500@inkedblade.net>
To: www-style@w3.org
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.

~fantasai
Received on Thursday, 29 March 2012 22:00:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:53 GMT