RE: [css3-ruby][css3-linebox] Proposal to add "auto" value for the line-stacking-ruby property
Koji Ishii <kojiishi <at> gluesoft.co.jp>
2010-12-01 16:24:35 GMT
Would you mind if I ask a question? It may be odd for me to ask this, but how accurate can a browser detect when
"ruby overlaps the previous line"?
Given the case of the first line after page break, I started to think if there were any other such cases. Is it
possible to share with us what you have in WebKit now?
Cases I thought are:
* Floating box moves to either left or right, so it can still detect where the previous line is.
* Text after floating box probably knows where the line before the floating box is.
* If the element has top or bottom (left or right in vertical) property specified, it's probably hard to
determine what the "previous" line is.
As far as I thought for a while, the top/bottom case and the first line after page break (and column break if
multicol) you mentioned are the only two cases where browser cannot know where the previous line is.
Do I miss any other cases?
Please note that I added [css3-ruby] to the subject just in case as the behavior of line-stacking-ruby is
From: Koji Ishii
Sent: Wednesday, December 01, 2010 9:33 AM
To: 'David Hyatt'
Cc: www-style <at> w3.org list
Subject: RE: [css3-linebox] Proposal to add "auto" value for the line-stacking-ruby property
Great to hear that WebKit took the way, and has already implemented. And yeah, I meant "overlap", sorry for
the confusion and thank you for pointing this out.
You're right that I was missing the case of the first line in paginated content. It's actually a good point.
Since author will not know which part of the document is the first line of pages, I agree that it should be
part of the behavior of "auto".
Given that, as you said, exclude-ruby is probably only useful for proof-reading purpose as far as I think.
I was thinking to add "auto" value, but if we ended up not being able to find any good use cases for
include-ruby/exclude-ruby values after this behavior is added, it may be better to change the section to
describe just the behavior rules and get rid of the property.
If anyone see use cases of include-ruby and/or exclude-ruby, I'd appreciate to know.
From: David Hyatt [mailto:hyatt <at> apple.com]
Sent: Wednesday, December 01, 2010 3:02 AM
To: Koji Ishii
Cc: www-style <at> w3.org list
Subject: Re: [css3-linebox] Proposal to add "auto" value for the line-stacking-ruby property
This change to a more complicated "auto" behavior came about when we tried to make "exclude-ruby" the
default and ran into compatibility problems with existing Ruby on the Web.
(hyatt <at> apple.com)
On Nov 30, 2010, at 11:49 AM, David Hyatt wrote:
> On Nov 29, 2010, at 11:57 PM, Koji Ishii wrote:
>> Hi All,
>> I would like to propose to add "auto" value to the line-stacking-ruby property:
>> This value behaves exactly same as "exclude-ruby", except when the ruby text overwraps with the
previous line, the UA should increase line spacing to avoid overwraps.
>> The idea is that, usually "exclude-ruby" is the correct behavior for the ruby text in most of cases, I
believe no one objects on this, but when the ruby text overwraps previous/next line, it splits; some wants
to increase the line spacing, while some wants to leave it overwrapped.
>> If you listen to people who wants to leave it overwrapped, it is because it makes them easier to find
issues, and it is considered to be editor's responsibility to take necessary actions depending on the
situation; sometimes increase line spacing for the line, sometimes increase all line spacing of the body
text, sometimes change the size of ruby text, and so forth. I believe no one wants to leave overwraps left as is.
>> I think "exclude-ruby" is very good for professional publishers, but I also think the default value
should be a little more friendly to the browser users. The "auto" value must help users to use their user
style sheets and prevents overwraps of ruby text over the previous lines, while keeping a good typography
when the line height has enough space for ruby text.
>> Any opinions are greatly appreciated.
> I believe you mean "overlap" instead of overwrap?
> It's an odd coincidence, but I just changed this behavior in WebKit about a week ago.
> WebKit now implements this behavior by default for Ruby. WebKit will not include the Ruby at first when
laying out a line, and if after it's done, some Ruby overlaps the previous line (or the next line in
vertical-lr), then the spacing is increased to accommodate the Ruby.
> The one use case I can think of for line-stacking-ruby:exclude-ruby is in paginated content, you might
like the Ruby on the first line to be in the margin area of the page. Maybe that could just be part of the
default behavior at page breaks though. If the property does have to exist, then that's fine I guess, but
the default should not be "always exclude" or "always include."
> (hyatt <at> apple.com)