Re: [css3-images] Referencing <svg> element directly with element()

On Feb 24, 2012, at 2:56 PM, Tab Atkins Jr. wrote:

> On Fri, Feb 24, 2012 at 2:35 PM, Dirk Schulze <> wrote:
>> With the current change objectBoundingBox and userSpaceOnUse are identical (just different wording, which should be fixed). Is that intended? userSpaceOnUse is important to make relative units (like length) relative the viewport, while they are relative the object on 'objectBoundingBox'. I have nothing against this change. But in this case you should say that you always use objectBoundingBox and userSpaceOnUse gets ignored. Would that match you intention?
> Huh?  They're definitely not identical (or at least, aren't intended
> to be).  User coordinates are completely different sizes in the two of
> them (matching standard SVG expectations, more or less).
Ah, I got the difference. 

"A single user coordinate is the width and height of the concrete object size."

"User coordinates are sized equivalently to the CSS px unit."

I was more looking at the actual size of the area. This is important for relative values. For userSpaceOnUse, the area is typically the viewport size, for objectBoundingBox the bounding box of the element.

<svg viewBox="0 0 100 100">
<pattern id="p1" x="0%" y="0%" width="100%" height="100%">


<rect width="50" height="50" fill="url(#p1)"/>

The size of the pattern is 100,100 for patternUnits="userSpaceOnUse" and 50,50 for patternUnits="objectBoundingBox".

Still, if you take the same area size, this is fine for me.


> ~TJ

Received on Friday, 24 February 2012 23:32:04 UTC