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

RE: [css3-writing-modes] Inlines and logical properties

From: Koji Ishii <kojiishi@gluesoft.co.jp>
Date: Mon, 11 Oct 2010 11:37:51 -0400
To: David Hyatt <hyatt@apple.com>, "www-style@w3.org list" <www-style@w3.org>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E0A779A8C98@MAILR001.mail.lan>
Hi Dave,

This is a very interesting question.

As you pointed out, directions relative to the baseline do not match to line progression in vertical-lr, and how to manage this is an issue.

What you proposed below can be a solution, but then we would lose a capability to set "10px space before H1". That is one of the important use case for logical properties, so I'd like to avoid that.

What I have in my mind now is:

l  Logical properties should be as they are defined now. This allows "10px space before H1" or "border after H1".

l  We would need another terminologies to define directions relative to baseline so that underline-position, emphasis-mark-position, or baseline-shift can be defined properly. Fantasai and I think "under" and "over" are good, because they're used in underline-position already, but there are some objections in the ML.

I think we have to give up the case you raised; use border to draw underline. We can't solve that in vertical-lr because border is part of a box, and underline is based on baseline direction. It's a nice technique, but I think it's logically incorrect way to use borders because it assumes that "under" matches to "after", which is not true for vertical-lr scripts. One should use <hr>, or add an empty box and use border for the box.

Koji Ishii

From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of David Hyatt
Sent: Saturday, October 09, 2010 1:04 AM
To: www-style@w3.org list
Subject: [css3-writing-modes] Inlines and logical properties

I've noticed a problem with logical properties as they relate to inlines.

For a vertical-lr block, the before side of the block is the left and the after side is the right.

However the "top" of a line and "bottom" of a line in a vertical-lr block are typically flipped relative to the block (see the rotated block above).  The "top" of the line is on the "after" side of the block and the "bottom" of the line is on the "before" side of the block.

My question is, "What do before and after mean on an inline?"  Technically the inline's writing-mode value is also vertical-lr, so if you obey that to the letter, "before" is the "bottom" side of the line.  However if you were to switch to a horizontal-tb writing mode, the "after" side becomes the "bottom" side of the line.

If the purpose of these logical properties is to allow you to switch between writing modes seamlessly then this seems like a problem to me.

For example, trying to use borders to do an underline on a span, e.g., border-after: 1px dotted blue would have to become border-before:1px dotted blue in a vertical-lr block.

My suggestion would be to make before/after map to top/bottom for horizontal lines and right/left for vertical lines.


(image/png attachment: image001.png)

Received on Monday, 11 October 2010 15:35:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:39 UTC