[EMAIL PROTECTED] wrote:
> Consider the following testcase:
> <div style="white-space:-moz-pre-wrap; font-size:200px;"><span
> style="background:yellow;">Hello Kitty</span></div>
> 
> When the line breaks, how should the space be treated? Should it be
> displayed in yellow at the end of the line? Or should it collapse away
> to nothing?
> 
> Right now on trunk it is displayed --- until you make the window
> narrow enough that the space overflows on the right, then it
> disappears. This seems clearly wrong.
> 
> Consider also the variant with two spaces. Currently they are both
> displayed, and then both disappear.
> 
> I kinda lean towards always displaying the spaces, just on the grounds
> that preformatted spaces should always be displayed.

Wouldn't that mean that you could get very ugly margins? Say for markup like

<div style="white-space:-moz-pre-wrap; border: 5px solid black;">
   <span style="background:yellow">
     Word   Word   Word   Word   Word   Word...
   </span>
</div>

The spaces between the words might overlap into the margin of the div, 
and that overlap will vary from row to row. I've seen some editing 
programs do this when you select text (i.e. the selected spaces off the 
end are rendered) and it looks horrible.

I would suggest we always collapse them instead. I suspect people are 
using white-space:pre and white-space:-moz-pre-wrap to get spaces 
between words rendered, not spaces at the end of lines.

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

Reply via email to