Re: 'border-image' confusion

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.  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).


> Because it is the same size as the border image area, the value of 'border-image-repeat' doesn't matter, as the sides will fit exactly, with no distortion, as long as 'border-image-slice' and 'border-image-width' are describing the same-size areas.

Yup, exactly.


> 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).

~TJ

Received on Monday, 7 February 2011 17:18:59 UTC