[css-logical-props] do shorthands have logical component longhands?

I'm working on making Gecko's logical properties behave as proposed in 
various mails to this list, where both physical and logical properties 
behave like normal properties in declarations but which are resolved at 
cascade time (after an initial computation of direction and 
writing-mode) to appropriate physical property values.

One question I have is whether logical longhand properties are 
considered to be parts of the corresponding shorthand, for example is 
margin-inline-start a longhand component of margin?  I think the answer 
should probably be "no" as you don't know what values to set the logical 
properties to:

   div { margin: 1px 2px 3px 4px; }

What would be the values of margin-inline-{start,end} in the declaration?

In terms of its effect on the layout of the document, it doesn't really 
matter, since margin-{left,right} would override any previous 
margin-inline-{start,end} properties in the declaration when we're 
resolving them during the cascade.  So from that perspective it makes 
sense to not set margin-inline-{start,end}.

On the other hand, it could be like other shorthands where if you don't 
have values specified for some components then they get set to their 
initial values (e.g. like when you leave out some parts of the font 
shorthand).  So we could have them set to 0.

Now, what if you want to clear the shorthand from script?

   <style>
   div { margin-inline-start: 1px; margin-inline-end: 2px; }
   </style>
   <script>
     document.styleSheets[0].cssRules.style.margin = "";
   </script>

I almost would expect that to clear the margin-inline-{start,end} 
properties, but that's not possible if they're not longhand components 
of margin.

Received on Friday, 19 December 2014 00:27:49 UTC