Re: [css3-background] What does 'border-image-slice: <number>' mean for SVG?

On Sun, Sep 11, 2011 at 9:33 AM, L. David Baron <dbaron@dbaron.org> wrote:
> http://dev.w3.org/csswg/css3-background/#border-image-slice says:
>  # <number>
>  #     Numbers represent pixels in the image (if the image is a
>  #     raster image) or vector coordinates (if the image is a
>  #     vector image).
>
> I'm not sure what "vector coordinates" are, for example in the case
> of SVG.  I'm guessing that for SVG with a viewBox or with an
> intrinsic size, this means that the image is drawn at its intrinsic
> size and these "vector coordinates" are coordinates in the viewport
> coordinate system.  (But if it has both a viewBox and height/width
> attributes on the root, which win?  Is it CSS pixels on the root's
> container, or the viewport coordinate system?)  It might be good to
> clarify that, though.
>
> But what happens if the SVG doesn't have an intrinsic size or
> doesn't have a viewBox?  What size is the SVG drawn at in order to
> determine the slices?

SVG always has user coordinates (the lengths referred to when you
provide a number without a unit).  I suspect that's what's meant
there.

For vector images with a defined width/height, such as <svg width=300
height=150>...</svg>, I'm not sure whether it's best to use that size,
or the user coordinates.

~TJ

Received on Monday, 12 September 2011 09:09:11 UTC