W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: [css3-ruby][css3-linebox] Proposal to add "auto" value for the line-stacking-ruby property

From: David Hyatt <hyatt@apple.com>
Date: Mon, 06 Dec 2010 23:24:57 -0600
Cc: "www-style@w3.org list" <www-style@w3.org>
Message-id: <608B060C-C23E-40D7-8C7E-A22F6DB20FF8@apple.com>
To: Koji Ishii <kojiishi@gluesoft.co.jp>
On Dec 6, 2010, at 11:07 PM, Koji Ishii wrote:

> Dave,
> 
> I'm sorry to bringing up once-agreed issue again, but I think I underestimated the case of "cross blocks" cases.
> 
> If I understand this correctly, the "cross blocks" cases you mentioned should include the cases when ruby is at the first line of <p> element, it cannot detect whether it intrudes the last line of previous <p> element. Do I understand this correctly?
> 

No.  Right now WebKit doesn't attempt to cross blocks, so in the case of two <p> elements with no margins between them, WebKit will just assume the Ruby needs space and grow the height of the first line in the second <p> if it has a Ruby on it that overlaps the previous <p>.  When I referred to crossing blocks, I was actually talking about the case where the two <p> elements *do* have margins such that the Ruby could sit in the margin.  That is the case WebKit can't handle right now.

It's not too bad to handle it though if we decide that this should work.  For vertical-rl and horizontal-tb it's pretty easy to detect that you could fit in the collapsed margin area, but vertical-lr is harder. You don't yet know how big the collapsed margin is going to be in vertical-lr, so you'd have to carry along the needed space and wait until the collapsed margin got resolved to figure out if subsequent lines had to move.

If we do let Ruby go into margins, I'd prefer if we limit the check just to the margins and don't try to look at lines in previous blocks.

> In Japanese documents, following properties are usually set:
> 
>  p { margin-top:0px; margin-bottom:0px; }
> 
> In this case, it is quite possible that the ruby at the first line of <p> can overlap the last line of previous paragraph in the same level as lines within blocks.
> 

Yeah that case is not an issue.  The issue is that WebKit won't let Ruby sit in the margin area between blocks or at the top of pages or the top of the document.  It is possible for me to implement this though, as I said above.  It's mostly just that vertical-lr would be annoying.

dave
(hyatt@apple.com)
Received on Tuesday, 7 December 2010 05:25:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT