RE: [css3-values] RE: CSSStyleDeclaration#length and shorthands.

We had some discussions on this topic in the context of box-shadow someday becoming a shorthand.  One proposal suggested that box-shadow would vanish from the list and events when that happens; another proposal suggested that box-shadow would remain.  I think the latter is better for compatibility and continuity so that "becoming a shorthand" is a pure positive activity rather than a partial negative activity (literally and from a compatibility perspective).  Jury is still out, last I checked.


Alexis Menard:
> I  meant should I explicitly set the initial or inherit on the
> longhands therefore add them to the list of declarations of the style?

I think "yes".

Brian:
> Example C:
> <span style="border: 7px dashed red;">s<div style="border: inherit;">D</div>s</span>
Alexis:
> But on example C do you expect to
> have DIV.style.length to report 1 or the same length as the SPAN.

The latter, they both should have the full complement of most atomic all the way up...
- border-top-width, border-right-width, border-bottom-width, border-left-width
- border-top-style, border-right-style, border-bottom-style, border-left-style
- border-top-color, border-right-color, border-bottom-color, border-left-color
- border-width
- border-style
- border-color
- border

In the span case, all of those would have "7px", "dashed", "red", or the combination of all three.
In the div case, all of those would have "inherit".

Alexis:
> Right now I'm unfamiliar with -prefix-initial so I will read about it.
When I say "-prefix-initial", I'm referring to "-webkit-initial", "-moz-initial", etc. -- aka vendor prefixes.  My not-at-all-subtle repeated point is that the spec(s) defining "initial" haven't reached CR yet so support for this value should be prefixed.

Alexis:
> Given this example : <div style="border-width: 1px 2px 3px
> 4px;"></div>. What would be the length of the style for the div?
>
> - 4 ? (border-top-width, border-right-width, border-bottom-width,
> border-left-width)
> - 5 ? (border-top-width, border-right-width, border-bottom-width,
> border-left-width, border-width)

I believe the length should be 5.

border-top-width: 1px;
border-right-width: 2px;
border-bottom-width: 3px;
border-left-width: 4px;
border-width: 1px 2px 3px 4px;

Received on Tuesday, 31 January 2012 19:42:08 UTC