Re: [css-backgrounds] Let border-style apply to border-image

> I guess, the main question is, why was border styling designed
> differently than background in that way? This inconsistency causes
> logical hurdles and constraints.
> The main purpose of the border-image properties was not to paint the
existing border, but to allow completely different border designs, in any
possible shape.  Clipping the image to the border shape would prevent many
border-image effects from working.

Border images override the basic border so that you can safely set both,
with the regular border as a fallback.  It also means that you can set the
border-width that is used for layout separately from the width used to
scale the image.

It sounds like what you're really hoping for is to have SVG stroke-style
paint options for regularly-shaped borders.

This could be perhaps achieved with a separate property, distinct from
border-image, which only overrides border-color and not the other border
styles.  However, the border properties are already so complicated, with so
many intersecting longhand properties (eg border, border-left, and
border-style all set border-left-style), that the syntax would need to be
considered very carefully.

Another option is to add a new sub-property to the border-image shorthand,
border-image-clip, which could have an option for clipping to the default
border outline, or to the border box, or margin-box or padding-box. * (Note
that this would be quite different from mask-border, which uses a
border-image layout algorithm to create a mask that then masks the entire
element, not just the border-image.) * The various border-image properties
could also be made into lists, to create stacked border images.

I do agree that it would be nice to be able to intersect CSS-only gradient
images with dashed, dotted, and double borders, without having to generate
an SVG data URI as the border-image.


Received on Wednesday, 9 March 2016 16:20:26 UTC