W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: 'border-image' confusion

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 7 Feb 2011 09:55:20 -0800
Cc: Simon Fraser <smfr@me.com>, "Eric A. Meyer" <eric@meyerweb.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <6CD47B43-BA41-452C-8461-F0D313E71B66@gmail.com>
To: Tab Atkins Jr. <jackalmage@gmail.com>

On Feb 7, 2011, at 9:18 AM, Tab Atkins Jr. wrote:

> On Mon, Feb 7, 2011 at 8:26 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> Actually, I'm not seeing anything in Backgrounds & Borders 3 that says how to dimension an image that has no intrinsic dimension. It should be the same size as the border image area[1]. Maybe we need to say that somewhere, or say it more explicitly if it is implied in there somewhere and I'm just missing it.
> 
> The Images spec says what to do.  

But only in the working draft and editor's draft, right? I'm thinking that BB3 is likely to hit PR sooner than Image Values spec. In BB3, it is made clear, with exacting language, what to do for 'background-size' if the image has no intrinsic dimensions. But it does not have that same sort of clear language within the same spec about using such an image as a border image.

> When used in border-image, the
> "default image sizing area" is the border image area.  Dimensionless
> images always take the size of the DISA unless there are further
> constraints in play (for border-image, there aren't any).

Sounds reasonable, but I would prefer something in the BB3 that said so, rather than having it rely on a working draft.

>> I have a concern about 'border-image-slice'. It doesn't seem to say anything about images without intrinsic dimensions if a <number> is the value. The spec says that "Numbers represent pixels in the image (if the image is a raster image) or vector coordinates (if the image is a vector image)." I don't think that gradients have vector coordinates, and counting pixels from all four sides also doesn't make sense. I think that what would make the most sense for dimensionless images (such as border-image-width) is to make any 'border-image-slice' <number> or <percentage> ignored, and just make it automatically the same as 'border-image-width'.
> 
> Sounds good for <number>s.  I don't see any reason to ignore
> <percentage>s, though - they seem to be sufficiently well-defined in
> both the properties that allow them (-slice and -width).

Well defined, but not useful. Anything that causes the 'border-image-slice' to be different from the 'border-image-width' results in a distorted  gradient. It's hard for me to say if it would be useful for some other hypothetical dimensionless image without vector coordinates.

I'd be OK with leaving percentages alone, I guess. But there doesn't seem to be a compelling reason for them to work that way on gradients, other than consistency with dimensionful image percentages (instead of consistency with dimensionless <numbers>s if we change that).
Received on Monday, 7 February 2011 17:55:55 GMT

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