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

Re: [css3-background] border-image dependancies on border-style and border-width

From: Daniel Tan <lists@novalistic.com>
Date: Sun, 01 Mar 2015 13:22:54 +0800
Message-ID: <54F2A22E.1090901@novalistic.com>
To: Brad Kemper <brad.kemper@gmail.com>
CC: www-style list <www-style@w3.org>
On 3/1/2015 8:22 AM, Brad Kemper wrote:
> I was noticing on caniuse.com <http://caniuse.com>[1] that they have
> this note about border-image:
>
>     Note that both the border-style and border-width must be specified
>     for border-images to work according to spec
>
>
> But that shouldn't be true unless you are setting border-image-width to
> a number instead of a length or percentage. Am I missing something, or
> is caniuse.com <http://caniuse.com> wrong?

Yeah, that seems to be poorly stated. The border image area is defined 
as the entire border box, including the padding and content areas, so 
lengths and percentages should work just fine even when border-width is 
zero. And this does work correctly in supporting browsers.

> P.S. I think it is kind of unfortunate that having 'border-style:none'
> changes the computed value of border-width to 0, regardless of what the
> author sets, since I think that is why border-style has to be explicitly
> set in order for 'border-image-width:[number]' to work. But I imagine it
> is way too late to change that. But could we have border-image-width use
> the cascaded value of border-width instead of the computed value?

border-style serves as a fallback for when the image cannot be loaded or 
when border-image is not supported. If the behavior of border-width were 
to change depending on the presence of a border image when border-style 
is none, this could have adverse effects on layout.

-- 
Daniel Tan
NOVALISTIC
<http://NOVALISTIC.com>
Received on Sunday, 1 March 2015 05:23:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:29 UTC