Re: [css3-writing-modes] a third option for implementing logical properties

David Hyatt wrote:

> Yes, we know we need mixed writing modes within the same document. 
> The question is do the vertical text sections have to degrade
> gracefully to horizontal using the same stylesheet, or could the
> author just feed a separate stylesheet to browsers that don't support
> vertical text?

So how would you feel about this:

 1. Use a subset of Murakami-san's proposed additional 'logical' keyword [1]
    proposal for margin-*, padding-*, border-*, top, bottom, left, right
    (physical would be implied by a lack of 'logical'):

    p { 
      margin: 1em 0px;
      margin: logical 1em 0px;
    }
 
 2. A new @writing-mode rule that would enclose style rules only used with
    user agents that fully support all writing-mode modes defined in
    CSS3 Writing Modes.

    /* styles used for fallback horizontal layout */
    .rounded { border-radius: 1em 2em; }
 
    @writing-mode {
      /* styles used when writing modes are supported */
      .rounded { border-radius: 2em 1em; }
    }
 
No property other than these basic box model properties would be
"logicalized", for those authors would handle the horizontal fallback
case using @writing-mode rules.  Properties like text-align, float still
need 'start' and 'end' values but that's an existing deficiency of the
spec. EPUB apps would need to use an explicit alternate stylesheet
mechanism to handle flipping of styles beyond the basic box model
properties. This allows tweaking to make both vertical and fallback
horizontal layouts optimal.

I can't say I'm in love with the 'logical' keyword notation but at least
it avoids the property explosion.  It also allows the shorthands to be
used in the logical case which I think is a big deficiency of the
current bazillion new properties proposal.

Others have proposed a more general @depends(property) rule but I think
that's much harder to spec, you need to think about how to version
properties.  Specified tightly as "valid only for writing modes defined
in CSS3 Writing Modes", I think an @writing-mode rule would be
relatively simple to implement.

John Daggett

[1] http://lists.w3.org/Archives/Public/www-style/2010Sep/0784.html

Received on Monday, 25 October 2010 06:11:34 UTC