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

Re: [css3-writing-modes] Keyword alternatives to "logical"

From: MURAKAMI Shinyu <murakami@antenna.co.jp>
Date: Thu, 28 Oct 2010 14:21:17 +0900
To: David Hyatt <hyatt@apple.com>
Cc: Koji Ishii <kojiishi@gluesoft.co.jp>, Hakon Wium Lie <howcome@opera.com>, John Daggett <jdaggett@mozilla.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>, Yasuo Kida <kida@apple.com>
Message-Id: <20101028142116.C95C.C598BCD7@antenna.co.jp>
David Hyatt <hyatt@apple.com> wrote on 2010/10/28 6:19:19
> On Oct 27, 2010, at 3:29 PM, MURAKAMI Shinyu wrote:
> > 
> >    margin-top:    [before|end|after|start]? <margin-width>
> >    margin-right:  [before|end|after|start|outside|inside]? <margin-width>
> >    margin-bottom: [before|end|after|start]? <margin-width>
> >    margin-left:   [before|end|after|start|outside|inside]? <margin-width>
> > 
> I really don't like adding logical keywords to properties that have physical names.  That just doesn't make any sense.
> The reason logical keywords work nicely with shorthands like "margin" or "border-style" is that no directionality was implied by the name of the property.

I understand.
I wrote in <http://lists.w3.org/Archives/Public/www-style/2010Oct/0775.html>:

	The shorthand syntax will be:

	    margin: [beas|tobi]? && <margin-width>{1,4}
	        | [before|end|after|start|outside|inside] <margin-width>

	The question is the timing of the logical (BEAS) to physical (TRBL)
	mapping using the computed values of writing mode properties.

	One idea is to define the "beas" notation as "direction dependent shorthand"
	 (similar to "direction dependent aliases" the current editor's draft's
	logical properties are) and the mapping occur when shorthand resolving.

e.g., shorthand 'margin: start 1em' is resolved to 'margin-right: 1em' when direction is RTL.

If this "direction dependent shorthand" idea is not good, and adding many new properties is also not good, the remaining way will be to reuse existing properties with adding some keyword(s) to their value definition. e.g.,:

    margin-top:    beas? <margin-width>
    margin-right:  [beas|tobi]? <margin-width>
    margin-bottom: beas? <margin-width>
    margin-left:   [beas|tobi]? <margin-width>

And the shorthands are:
    margin: before <margin-width> => margin-top:    beas <margin-width>
    margin: end <margin-width>    => margin-right:  beas <margin-width>
    margin: after <margin-width>  => margin-bottom: beas <margin-width>
    margin: start <margin-width>  => margin-left:   beas <margin-width>
    margin: outside <margin-width> => margin-right: tobi <margin-width>
    margin: inside <margin-width>  => margin-left:  tobi <margin-width>
    margin: beas <margin-width>{1,4} => margin-top/right/bottom/left: beas <margin-width>
    margin: tobi <margin-width>{1,4} => margin-top/right/bottom/left: tobi <margin-width>

(The "beas" flag will disappear in the computed values, but the "tobi" will remain for inside/outside.)

Antenna House Formatter:
Received on Thursday, 28 October 2010 05:21:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:52 UTC