W3C home > Mailing lists > Public > www-style@w3.org > June 2009

Re: border-images with hollow center

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 17 Jun 2009 10:24:30 -0700
Cc: www-style@w3.org
Message-Id: <90B33C49-F420-4C30-869E-857A6812A5E5@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
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'?

On Jun 16, 2009, at 11:47 PM, fantasai wrote:

>  <fantasai> A) Keep the middle by default. Add 'empty' to clip it.
>  <fantasai> B) Clip the middle by default. Add 'fill' to use it.
>  <fantasai> C) No keyword, always kept. (Make transparent as needed.)
>  stevez: simplest is (c)
>  dbaron: don't like the name 'empty'
>  [...]
>  howcome: we're talking about a border, it shouldn't cover  
> everything by
>           default
>  [...]
>  several: most use cases of border image would need transparency  
> around
>           the outer edge any way
>  dbaron: you're not going to chop and slice a picture of your face
>  [...]
>  don't have consensus here
>  bert: didn't designers ask for (a)
>  [...]
>  anne: (b) is useless but, sure, whatever
>  [...]
>  <dbaron> (sense that people dislike (a) because of the 'empty'  
> keyword,
>            not the concept)
>  chrisl: i like what (b) does, whatever the keyword
>  fantasai: I think hyatt would like (b) for perf reasons
>  fantasai: but i haven't talked to hyatt in a long time
>  RESOLVED: Clip middle by default, add 'fill' to use it

Received on Wednesday, 17 June 2009 17:25:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:37 UTC