Re: border-images with hollow center

On Wed, Jun 17, 2009 at 12:24 PM, Brad Kemper<brad.kemper@gmail.com> wrote:
> It seems the WG was split between B & C, but A or C seem most reasonable to
> me (and I favor C). Here's why:
> 1. My gut tells me that that overwhelming majority of actual usage (in the
> neighborhood of 97%+) will be with using image formats that
> support transparency, including PNG, GIF, SVG, etc., and that the majority
> of those will probably be using PNG for the next few years. Why? Because as
> several pointed out, for any non-rectangular image, you will
> need transparency around the outer edge anyway (or between various pixels of
> the border edge). Of the remaining people that use
> non-transparency-supporting formats, they will likely need to match pixels
> in the image to the color of one or more backgrounds, so there is nothing
> that makes the background color of the inside of the element more important
> than the background of the element's container(s). So why have a default
> that is only applicable to a small percentage of the cases?
> 2. Having the middle section stretch (as per the last bullet of "step 1" in
> 5.4) is very useful for things like buttons, but with "B" as the default it
> requires an extra keyword to make it happen. I am generally against
> proposals that make simple authorial things more complicated, or which
> require a frequent extra step of remembering and inserting a keyword.
> Especially when that keyword only exists for the purpose of a seldom-needed
> use. This will result in people wondering why the center of their image
> didn't even draw, then having to remember the magic word for making it work
> the way they expect.
> Thus, if it is really important to have the extra complication of a keyword
> that hardly anyone would actually need, then it should really default to the
> value that people are going to want for all but the vanishingly small number
> of cases. If 'empty' is not a good word, how about 'hollow'?

I also still agree with Brad.  In the (I expect) common use case of
fancy buttons, you'll need the middle filled in.  In many other cases,
you'll want a background that matches up with the border in any case,
so it's not important whether it comes from the border-image or
background property (but putting it in border-image saves an http
request).

The only case where it makes sense to prioritize center clipping is if
you expect the common use of this to be non-transparent formats that
have a straight edge (and thus don't need to 'fake' transparency and
can ignore the background color/background of ancestors completely).
I, like Brad, expect that the vast majority of border-image uses will
be PNG or GIF at the moment, and transparency-supporting formats in
general in the future, with non-straight edges that take advantage of
transparency properly.  I know that in *my* own design work I'll be
using PNGs exclusively.

So I prefer (a) as it means slightly less typing for me in own work,
and think that just going with (c) would result in an insignificant
amount of hardship for designers.

(I, like before, have no opinion whatsoever on what the keyword would be named.)

~TJ

Received on Wednesday, 17 June 2009 17:55:44 UTC