[css3-background] - border-image-slice inconsistent should behave like edge shorthands

border-image-slice could be viewed as a shorthand for the following properties:
* border-image-slice-top
* border-image-slice-bottom
* border-image-slice-left
* border-image-slice-right
* border-image-slice-fill: discard|preserve

Now I am not proposing that they be added as individual properties (although it would be consistent) but simply that border-image-slice should behave in the same way as edge related shorthands such as padding/margin/border-color/ etc. The order in which the edges are specified is consistent, what is not is what happens when < 4 values are specified.

At the moment the specification states at http://www.w3.org/TR/2009/CR-css3-background-20091217#border-image-slice that
    "If the fourth number/percentage is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first."

That is different to the way that ALL the edge shorthands are specified.
* http://www.w3.org/TR/CSS2/box.html#propdef-padding
* http://www.w3.org/TR/CSS2/box.html#propdef-margin
* http://www.w3.org/TR/CSS2/box.html#propdef-border-width
* http://www.w3.org/TR/CSS2/box.html#propdef-border-style
* http://www.w3.org/TR/CSS2/box.html#propdef-border-color

Which state that:
    "If there is only one value, it applies to all sides. If there are two values, the top and bottom borders are set to the first value and the right and left are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and left, respectively."

The same issue applies to border-image-width and border-image-outset.

e.g.
When 1 value is specified they are consistent:
    border-image-slice: 1 = border-image-slice: 1 1 1 1
    border-width: 1px = border-width: 1px 1px 1px 1px

When 2 values are specified they are inconsistent:
    border-image-slice: 1 2 = border-image-slice: 1 2 1 1
    border-width: 1px 2px = border-width: 1px 2px 1px 2px

When 3 values are specifed they are inconsistent:
    border-image-slice: 1 2 3 = border-image-slice: 1 2 3 1
    border-width: 1px 2px 3px = border-width: 1px 2px 3px 2px

Whatever the relative merits are of the different approach I think that it is too late to switch to another convention.

Received on Tuesday, 1 June 2010 10:01:48 UTC