white-space:pre and line breaking

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

white-space:pre and line breaking

Robert O'Callahan-3
We break runs of CJK ideographs between certain ideograph pairs using
some standard algorithm. We suppress this breaking in runs that are
white-space:pre. On one hand, that means authors using white-space to
prevent breaking in regular text also have it working by analogy in CJK
text. On the other hand, it makes no sense; there is no whitespace here
for white-space to act upon. What's correct?

Rob
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: white-space:pre and line breaking

Justin Wood (Callek)-2
Robert O'Callahan wrote:
> We break runs of CJK ideographs between certain ideograph pairs using
> some standard algorithm. We suppress this breaking in runs that are
> white-space:pre. On one hand, that means authors using white-space to
> prevent breaking in regular text also have it working by analogy in CJK
> text. On the other hand, it makes no sense; there is no whitespace here
> for white-space to act upon. What's correct?
>

Without me having much (if anything) to add to this conversation, do you
have any testcases to run on other UA's, such as IE, Opera, Safari,
(others?) to see how interoperable this functionality is.

I'd personally suggest <pre>; and <div style="whitespace:pre"> tests
seperate.

~Justin Wood (Callek)
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: white-space:pre and line breaking

Jean-Marc Desperrier
Justin Wood (Callek) wrote:
> Robert O'Callahan wrote:
>> We break runs of CJK ideographs between certain ideograph pairs using
>> some standard algorithm. We suppress this breaking in runs that are
>> white-space:pre. On one hand, that means authors using white-space to
>> prevent breaking in regular text also have it working by analogy in CJK
>> text. On the other hand, it makes no sense; there is no whitespace here
>> for white-space to act upon. What's correct?

Well I'm not expert about that but I just had a look in the CSS2 norm,
and you can find this about using 'white-space: pre' :
http://www.w3.org/TR/1998/REC-CSS2-19980512/text.html#white-space-prop
        [...] Lines are only broken at newlines in the source, or at
occurrences of "\A" in generated content.

So it seems the current implementation is correct.

> Without me having much (if anything) to add to this conversation, do you
> have any testcases to run on other UA's, such as IE, Opera, Safari,
> (others?) to see how interoperable this functionality is.
>
> I'd personally suggest <pre>; and <div style="whitespace:pre"> tests
> seperate.

Shifting the topic a bit, currently using <pre>, and therefore also
text/plain, breaks a lot of i18n features. It's not nice when combining
character stop to combine and I believe strange things also happen for
bidi. So I'm all for roc changing things to that regard, and make it
work better, current behavior is not satisfying at all generally, even
if that particular point seems correct.
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: white-space:pre and line breaking

Robert O'Callahan-3
Jean-Marc Desperrier wrote:
> Well I'm not expert about that but I just had a look in the CSS2 norm,
> and you can find this about using 'white-space: pre' :
> http://www.w3.org/TR/1998/REC-CSS2-19980512/text.html#white-space-prop
>     [...] Lines are only broken at newlines in the source, or at
> occurrences of "\A" in generated content.
>
> So it seems the current implementation is correct.

That's a good point, although I don't know if the person who wrote that
was thinking about CJK at the time.

Rob
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: white-space:pre and line breaking

L. David Baron
On Thursday 2006-07-06 10:18 +1200, Robert O'Callahan wrote:

> Jean-Marc Desperrier wrote:
> > Well I'm not expert about that but I just had a look in the CSS2 norm,
> > and you can find this about using 'white-space: pre' :
> > http://www.w3.org/TR/1998/REC-CSS2-19980512/text.html#white-space-prop
> >     [...] Lines are only broken at newlines in the source, or at
> > occurrences of "\A" in generated content.
> >
> > So it seems the current implementation is correct.
>
> That's a good point, although I don't know if the person who wrote that
> was thinking about CJK at the time.
I suspect he was not.

However, I also think that the 'white-space' property should apply to
more than just white space in CJK languages.  I suspect the author of
http://www.w3.org/TR/2003/CR-css3-text-20030514/ was, but that draft
probably needs more review before it's really ready for implementation.

-David

--
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: white-space:pre and line breaking

Jean-Marc Desperrier
In reply to this post by Jean-Marc Desperrier
Jean-Marc Desperrier wrote:
> Shifting the topic a bit, currently using <pre>, and therefore also
> text/plain, breaks a lot of i18n features. It's not nice when combining
> character stop to combine [...]

Or when you can not use ZWJ (U+200D) in gmail composition window :
http://familleandries.iquebec.com/tifinar/clavier-gmail-composition.png

(should look like ):
http://familleandries.iquebec.com/tifinar/gmail-safari.png

Images coming from http://hapax.qc.ca/polices-et-clavier.html
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: white-space:pre and line breaking

fantasai
In reply to this post by Robert O'Callahan-3
Robert O'Callahan wrote:

> Jean-Marc Desperrier wrote:
>> Well I'm not expert about that but I just had a look in the CSS2 norm,
>> and you can find this about using 'white-space: pre' :
>> http://www.w3.org/TR/1998/REC-CSS2-19980512/text.html#white-space-prop
>>     [...] Lines are only broken at newlines in the source, or at
>> occurrences of "\A" in generated content.
>>
>> So it seems the current implementation is correct.
>
> That's a good point, although I don't know if the person who wrote that
> was thinking about CJK at the time.

I don't think it matters. If you turn text wrapping off, it's off.

~fantasai
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout