W3C home > Mailing lists > Public > www-style@w3.org > March 2016

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

From: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>
Date: Wed, 9 Mar 2016 09:19:57 -0700
Message-ID: <CAFDDJ7yNUA0bMpL4taU2AX6Z1YUh6eBeAkm5YBJvkfHbz9q=bA@mail.gmail.com>
To: Sebastian Zartner <sebastianzartner@gmail.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>
> 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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:01 UTC