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

Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

From: MURAKAMI Shinyu <murakami@antenna.co.jp>
Date: Wed, 09 Jun 2010 01:54:18 +0900
To: John Daggett <jdaggett@mozilla.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>, Hakon Wium Lie <howcome@opera.com>
Message-Id: <20100609015418.2D8F.C598BCD7@antenna.co.jp>
John Daggett <jdaggett@mozilla.com> wrote on 2010/06/08 16:14:21
> Shinyu Murakami wrote:
> > - cannot use in inline style attributes, e.g. style="margin-left: 2em"
> > - cannot write basic default stylesheet.
> I agree, in both these cases you cannot easily construct styles that work
> in both the horizontal and vertical text cases.
> > MS IE supports many writing modes (total 8 writing modes, see:
> > http://blogs.msdn.com/b/ie/archive/2009/05/29/the-css-corner-writing-mode.aspx )
> > and seems to have good default style sheet, works in all
> > writing modes,
> It does work but what you get by default isn't always usuable in both
> horizontal and vertical modes.   Consider how the two examples below
> render in IE8, the only difference is writing-mode: tb-rl applied to
> the vertical example.
> Horizontal version (no writing-mode):
> http://people.mozilla.org/~jdaggett/tests/wagahaiwanekodearu.html
> Vertical version (writing-mode: tb-rl):
> http://people.mozilla.org/~jdaggett/tests/wagahaiwanekodearu-vert.html
> The horizontal mode ends up as one long vertical block with the view
> positioned at the top.  The vertical mode version ends up with a long
> horizontal block with the view positioned at the *end* of the text
> (i.e. the far left).  Good default styles or not, one is usuable, the
> other has problems.  I'm not knocking IE8, I think there are hard problems
> here that aren't solved with simple solutions.

In your example, the vertical version, writing-mode: tb-rl is specified
on the div element.

  div { writing-mode: tb-rl; }

and the root element's writing-mode is lr-tb by default.
It means the entire document is horizontal writing and 
contains a vertical writing block inside.

The principal writing mode of the document should be
specified on the root element.

  html { writing-mode: tb-rl; }

I put a modified vertical version (writing-mode: tb-rl on the root element):

Please test this with IE8. The viewport is positioned at the 
beginning of the text (the right side) and can scroll to 
the left (with mouse wheel).

I think this behaviour is natural and should be written in
the CSS3 Text Layout spec.

> > I think the cost for implementations will not be big problem in such
> > future.
> I think you're underestimating the impact of this change.  You are basically
> virtualizing top/bottom/left/right, so any other property that uses 
> top/bottom/left/right needs an expanded set of values or requires redefinition.
> Other properties in CSS 2.1:
> 'background-position'
> 'caption-side'
> 'clear'
> 'float'
> 'text-align'
> 'vertical-align'
> Other CSS3 modules affected:
> CSS3 Multi-Columns (column-rule-width)
> CSS3 2D Transforms (transform-origin)
> CSS3 3D Transforms (perspective-origin, transform-origin)
> CSS3 Backgrounds (border-image, border-color, border-style, lots and lots of others)
> CSS3 Images
> CSS3 Paged Media (?)
> CSS3 Transitions (logical properties can be transitioned?)
> These all use physical properties in one way or another.

I don't think all CSS properties need logical version.
It should be limited to basic properties indispensable to
express the document's structural elements and for readability.
For example indents (margin-start and -end) are important for

It should not expand to decorative and graphics related properties.

We don't expect perfect graphical results in both vertical and
horizontal writing modes with one stylesheet. In such case,
we should use separate stylesheets for each writing mode.
Note that usually, vertical writing mode is requested for 
not very graphical, text-centric content like novels.

Best regards,

ζ‘δΈŠ ηœŸι›„ (MURAKAMI Shinyu)
Antenna House Formatter:
Received on Tuesday, 8 June 2010 16:55:25 UTC

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