- From: Richard Ishida <ishida@w3.org>
- Date: Fri, 15 Oct 2004 11:55:28 +0100
- To: <www-style@w3.org>, <w3c-css-wg@w3.org>, <w3c-i18n-wg@w3.org>
Hi Elika, Some more comments. Again, my own, not yet endorsed by i18n wg. > -----Original Message----- > [mailto:w3c-i18n-wg-request@w3.org] On Behalf Of fantasai > Sent: 04 October 2004 17:05 <snip/> > Part II: White Space Handling > ============================= > > CSS3 Text defines the following properties to affect white > space processing: > > Property Origin Controls > -------- ------ -------- > linefeed-treatment XSL how to transform line breaks > white-space-treatment XSL whether to preserve > other white space > all-space-treatment XSL whether to collapse > remaining white space > > CSS3 Text: > linefeed-treatment: auto | ignore | preserve | treat-as-space | > treat-as-zero-width-space | > ignore-if-after-linefeed > white-space-treatment: ignore | preserve | > ignore-if-before-linefeed | > ignore-if-after-linefeed | > ignore-if-surrounding-linefeed > all-space-treatment: preserve | collapse > > XSL: > linefeed-treatment: auto | ignore | preserve | treat-as-space | > treat-as-zero-width-space | > ignore-if-after-linefeed > white-space-treatment: ignore | preserve | > ignore-if-before-linefeed | > ignore-if-after-linefeed | > ignore-if-surrounding-linefeed > white-space-collapse: true | false > > WinIE: > n/a > > Proposed: > white-space-something: discard | preserve | [ collapse || > [ > auto-collapse-breaks | > > space-collapse-breaks | > > zero-width-collapse-breaks | > discard-breaks | > preserve-breaks ] ] > 'collapse' implies 'auto-collapse-breaks' > '*-breaks' implies 'collapse' > examples: > /* Discard all white space, including breaks */ > white-space-sth: discard; > /* Preserve all white space, including breaks > as in "white-space: pre" / "white-space: pre-wrap" */ > white-space-sth: preserve; > /* Collapse consecutive white space into single space, > auto-collapsing breaks and surrounding white space based on > surrounding script context (-> space, zwsp, or discard) > as in "white-space: normal" / "white-space: nowrap" */ > white-space-sth: collapse; > white-space-sth: collapse auto-collapse-breaks; > white-space-sth: auto-collapse-breaks collapse; > white-space-sth: auto-cllapse-breaks; > /* Collapse consecutive white space into single space, > collapsing breaks and surrounding white space into > single space */ > white-space-sth: collapse space-collapse-breaks; > white-space-sth: space-collapse-breaks collapse; > white-space-sth: space-collapse-breaks; > /* Collapse consecutive white space into single space, > collapsing breaks and surrounding white space into > zero-width space */ > white-space-sth: collapse zero-width-collapse-breaks; > white-space-sth: zero-width-collapse-breaks collapse; > white-space-sth: zero-width-collapse-breaks; > /* Collapse consecutive white space into single space, > but discard collapse breaks and surrounding white space */ > white-space-sth: collapse discard-breaks; > white-space-sth: discard-breaks collapse; > white-space-sth: discard-breaks; > /* Collapse consecutive white space into single space, > but discard collapse breaks and surrounding white space > as in "white-space: pre-lines" */ > white-space-sth: collapse preserve-breaks; > white-space-sth: preserve-breaks collapse; > white-space-sth: preserve-breaks; > <snap/> Your suggestion certainly makes it much easier to understand and use this currently complex set of properties. I think it probably covers most of the necessary possibilities, though I'd definitely like to hear Michel Suignard's point of view, since he worked very hard on this stuff. (I think it will make things clearer to use the explanations I tried in my previous mail.) Seems like one thing that is not available is to not collapse the consecutive white-space-without-linebreaks independently of consecutive ws-with-linebreaks. I'm not sure that's an i18n issue, however. It occurred to me that it may be useful for a script like Thai, where spaces are used to indicate phrase boundaries (rather than words) - ie. not full stops. In some cases multiple spaces indicate more important boundaries. This could probably be achieved by using a combination of nbsp and space though. There may be an issue for people who want to preserve tabs while collapsing consecutive ws-with-linebreaks ? I don't understand why you list multiple ways of declaring the same thing, eg: > white-space-sth: collapse; > white-space-sth: collapse auto-collapse-breaks; > white-space-sth: auto-collapse-breaks collapse; > white-space-sth: auto-cllapse-breaks; I think this is not a good idea, and would rather just see: > white-space-sth: auto-cllapse-breaks; white-space-sth could be called white-space-treatment, no? Or white-space-normalization white-space-handling (it's a shame that white-space is already taken) RI PS: I started putting together some tests for white space treatment with ideographic characters using CSS2.1. When I get a moment I'll expand them to include thai and kana characters. They are currently based on CSS2.1 rules + assumptions drawn from the CSS3 work. Tests: http://www.w3.org/International/tests/sec-white-space-1 http://www.w3.org/International/tests/sec-white-space-2 Preliminary results and conclusions can be found at http://www.w3.org/International/tests/results/white-space-ideograph One specific question I have: should I make assumptions in the tests themselves. ie. one of the tests currently says: "Displayed text should be a single line with no spaces after the character ?." An alternative approach, especially given that we are making some assumptions here because the CSS2.1 spec is not very specific, is to just say "Is there a single line? Is there a space before the character ?." The end results page would be the same, since we express our assumptions there.
Received on Friday, 15 October 2004 10:55:30 UTC