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

Re: Border-Images and 'round': CSS Backgrounds and Borders Module Level 3

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 30 Sep 2009 17:18:17 -0700
Message-ID: <4AC3F549.9050102@inkedblade.net>
To: Brad Kemper <brad.kemper@gmail.com>
CC: www-style list <www-style@w3.org>, Bert Bos <bert@w3.org>
Brad Kemper wrote:
> fantasai wrote:
>> Brad Kemper wrote:
>>>
>>> On Sep 29, 2009, at 7:44 PM, fantasai wrote:
>>>
>>>> Brad Kemper wrote:
>>>>> Does anyone remember why it is reduce-only? If it is a matter of the 
>>>>> tile losing resolution as it grows, I think that is more acceptable 
>>>>> for the smaller adjustments that may be needed that having much 
>>>>> larger adjustments required.
>>>>
>>>> It's reduce-only to avoid losing resolution, yes. Probably that 
>>>> restriction
>>>> should be lifted for vector images at least.
>>>
>>> At least. At worst, the raster image will be no worse that images with 
>>> the "stretch" keyword. If authors are concerned, they can build more 
>>> resolution into their source images, or have them scaled down in 
>>> 'border-image-width'.
>>>
>>> Or, alternately, we could favor reductions by having any space that 
>>> was less than say 25% of a tile size result in widening, and 
>>> everything else resulting in width reduction.
>> 
>> Ok, I've updated the spec to say this.  
>>   http://dev.w3.org/cvsweb/csswg/css3-background/Overview.src.html.diff?r1=1.167&r2=1.168&f=h 
>> Bert, do you agree with this change?
> 
> Those look like all good changes to me

Bert responded on IRC:

<Bert> B.t.w, fantasai, I don't think your latest edit to Backgrounds is
   correct. ceil() is better than round(), bcause it creates fewer raster
   artifacts. Moreover, you introduced a risk of incompatibility by allowing
   UAs to use different algorithms in unspecified cases.

I think it's a good point about the incompatibility, but I also think
it makes sense to use round() in the cases where there's no problem
with raster artifacts. Vector images and images with sufficiently
high resolution are such cases. At the very least we should allow this
for vectors.

How about I tighten up the text to use round() normally, but require
ceil() when there's a raster image with insufficient resolution?
Something like this?
   http://dev.w3.org/cvsweb/csswg/css3-background/Overview.src.html.diff?r1=1.172&r2=1.173&f=h
(I'm not sure if I should replace "device pixel" there with "1px".)
What do you think, Bert?

~fantasai
Received on Thursday, 1 October 2009 00:18:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:21 GMT