- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 5 Feb 2009 15:19:13 -0600
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
On Thu, Feb 5, 2009 at 1:43 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>
> If an image border and a non-image border are both specified on an element,
> the image border always wins over the non-image border. In a lot of cases
> this makes sense, as you are specifying them together and the non-image
> border is meant as a fallback:
>
> .super-sale {
> border: solid red;
> border-image: url(ragged-edge.svg) 25%;
> }
>
> But when you have multiple elements and classes and you're using the
> cascade, if a declaration further back in the cascade uses border-image
>
> .sidebox {
> border: thin silver;
> border-image: url(cartouche) 25%;
> }
>
> and a more specific declaration wants to set a different border
>
> #message-box {
> border: none;
> border-radius: 0.5em;
> box-shadow: 0.3em 0.3em;
> }
>
> unless it resets border-image, that new border style will have no effect.
>
> So I'm thinking maybe the 'border' shorthand should reset border-image,
> so that when you use it you know you're starting with a blank canvas.
>
> Thoughts?
Given the current definition of the border shorthand property, I'm
somewhat against this. I expect shorthands to use the default values
for things that I don't specify, but do not expect them to reset
anything that I *can't* specify in them. It feels like it might
create hard-to-spot errors.
I do see the reasoning behind it, though, and so wouldn't be opposed
to this if others liked it.
~TJ
Received on Thursday, 5 February 2009 21:19:49 UTC