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

Also sprach MURAKAMI Shinyu:

 > >  > For UAs supporting only horizontal writing, *-before, *-after,
 > >  > logical-width and logical-height are simply aliases of *-top, *-bottom,
 > >  > width and height respectively. No costs needed.
 > > 
 > > From this, however, it is unclear if the properties turn into "real
 > > properties" when/if vertical writing is supported.
 > 
 > The *-before, etc. will be pure aliases until vertical writing 
 > is supported, and turn into DDAs when vertical writing is supported.

I don't understand. What is the difference between "pure aliases" and
DDAs (direction dependent alias)? To me, these mean the same thing.
That is, an "alias" is a name that can be used in style sheets (and
perhaps also in the DOM) but there is no real property or memory
structure underneath.

For example, 'margin-start: 10px' is an alias that is resolved when
the computed value of 'writing-mode' has been determined;
'margin-start' is then resolved into 'margin-left: 10px', 'margin-top:
10px', or 'margin-right: 10px' (as you show in [1]).

Likewise, when the value of 'margin-start' is queried through the DOM,
'writing-mode' will be consulted to determine which of 'margin-left',
'margin-top', 'margin-right' that should be consulted to determine the
value. (Or, alternatively, one could leave it to an external
script/library to do this job.)

In this model, no new storage necessary for the alisases. 

In paged media, there is also a requirement to set values on the
inside and outside of pages. For example:

   margin-outside: -30px

An aliasing mechainism could be the right approach.

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

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Wednesday, 2 June 2010 20:23:14 UTC