W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css3-background] SVG in border-image / background-image

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 17 Jan 2012 20:00:20 -0800
Message-ID: <4F1643D4.3080309@inkedblade.net>
To: www-style@w3.org
On 12/19/2011 10:17 AM, fantasai wrote:
> On 05/26/2009 05:55 AM, Erik Dahlström wrote:
>> Hi www-style,
>>
>> when a 'border-image' property[1] references an SVG image, how should the border parts be rendered?
>>
>> Doing a rasterization followed by e.g stretching when there's vector data available seems like a suboptimal solution.
>>
>> After having looked at the various scenarios, both where the SVG has a viewBox attribute and when it doesn't, the idea of
>> splitting the viewBox rectangle using the cuts defined in CSS would seem the most logical and useful one. To be intuitive
>> and easy to use that would imply that @preserveAspectRatio in the SVG must be ignored[2]. For the case where there's no
>> @viewBox the behaviour could be defined to be as if there was a viewBox with value "0 0 width height", where the width and
>> height are absolute values from the svg root element (and in case they need to be resolved, e.g percentage values, they are
>> resolved using the size of the split border-image destination area).
>>
>> Please define the processing for the SVG-in-border-image case.
>
> I'm sorry, I seem to have missed this message. Filed as ISSUE-208.
> https://www.w3.org/Style/CSS/Tracker/issues/208

I don't really like the idea of special-casing SVG as opposed to other image
formats, so my suggestion is to add text like this:

   | If the image must be sized to determine the slices (for example, for SVG
   | images with no intrinsic size), then it is sized as for an auto-sized
   | background, using the border image area as the default object size in
   | place of the background positioning area.

Let me know if this would solve the problem, or if something else is necessary.

~fantasai
Received on Wednesday, 18 January 2012 04:00:53 GMT

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