- From: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Date: Thu, 28 Oct 2010 05:29:27 +0900
- To: Koji Ishii <kojiishi@gluesoft.co.jp>
- Cc: Hakon Wium Lie <howcome@opera.com>, John Daggett <jdaggett@mozilla.com>, David Hyatt <hyatt@apple.com>, "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>, Yasuo Kida <kida@apple.com>
Koji Ishii <kojiishi@gluesoft.co.jp> wrote on 2010/10/28 0:27:16
> By looking at John and Murakami-san's proposals and Håkon's feedback, I would like to propose another alternative to the "logical" keyword:
>
> margin-top: of-block 1em;
>
> I hope this makes some sense in English, although question remains if:
>
> margin-left: of-block 1em;
>
> can points to the correct side of the block in LTR/RTL. I can't determine from my English skill, someone's help would be appreciated. But if it does, this same keyword should work in shortcuts like this:
>
> margin: of-block 1em 2em 3em 4m;
>
> It's just a change in keyword, but being able to use single keyword everywhere could help both authors and browser developers a bit.
I think it is difficult to define a single keyword.
I wrote in <http://lists.w3.org/Archives/Public/www-style/2010Oct/0775.html>:
> > margin: [beas|tobi]? && <margin-width>{1,4}
> > | [before|end|after|start|outside|inside] <margin-width>
> >
> > margin-top: before? <margin-width>
> > margin-right: [end|outside]? <margin-width>
> > margin-bottom: after? <margin-width>
> > margin-left: [start|inside]? <margin-width>
I'd like to use before|end|after|start|outside|inside keywords for consistency with other property values.
But I know the above definition is not very good; it's very horizontal-tb-ltr biased. So I want the following instead:
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>
Example:
#foo {
margin-top: start 1mm;
margin-right: before 2mm;
margin-bottom: end 3mm;
margin-left: after 4mm;
}
The computed values will be,
when writing-mode is vertical-rl:
margin-top: 1mm; /* from 'margin-top: start 1mm' */
margin-right: 2mm; /* from 'margin-right: before 2mm' */
margin-bottom: 3mm; /* from 'margin-bottom: end 3mm' */
margin-left: 4mm; /* from 'margin-left: after 4mm' */
and when writing-mode is horizontal-tb(ltr):
margin-top: 2mm; /* from 'margin-right: before 2mm' */
margin-right: 3mm; /* from 'margin-bottom: end 3mm' */
margin-bottom: 4mm; /* from 'margin-left: after 4mm' */
margin-left: 1mm; /* from 'margin-top: start 1mm' */
>
> To extend this to inside/outside scenario, we could say:
>
> margin-left: of-recto 1em;
>
> Does this make sense in English? Maybe "in-recto" is the correct preposition, I'm not sure, but I hope you get the idea.
The 'left of-recto' means 'inside' when page-progression is ltr but 'outside' when rtl. I want use 'inside' and 'outside' regardless of ltr or rtl.
I prefer:
margin-right: outside 5mm;
margin-left: inside 7mm;
and this can be also written as:
margin-left: outside 5mm;
margin-right: inside 7mm;
In the right page, the used values will be:
margin-right: 5mm;
margin-left: 7mm;
and in the left page, the used values will be:
margin-left: 5mm;
margin-right: 7mm;
(Note: the outside|inside flags have to be kept in the computed values.)
--
MURAKAMI Shinyu
http://twitter.com/MurakamiShinyu
Antenna House Formatter:
http://www.antennahouse.com
Received on Wednesday, 27 October 2010 20:30:16 UTC