[svgwg] Issue: Clarify what is the size of a use element if width and height are not specified marked as DoC_accepted

nikosandronikos has just labeled an issue for 
https://github.com/w3c/svgwg as "DoC_accepted":

== Clarify what is the size of a use element if width and height are 
not specified ==
If a ‘use’ element without 'width' and 'height' specified references a
 ‘symbol’ element, should the width and height of the ‘symbol’ element
 be used?

[The spec](https://svgwg.org/svg2-draft/struct.html#UseReUse) says: 
“If attributes ‘width’ and/or ‘height’ are not specified, the 
generated ‘svg’ element will use values of '100%' for these 
attributes.”

Does it mean:
1. if ‘width’ and ‘height’ are not specified _on the ‘use’ element_
2. if ‘width’ and ‘height’ are not specified _on the generated ‘svg’ 
element (after deep-cloning the ‘symbol’ element, which includes 
cloning its ‘width’ and ‘height’ attributes)_

Here’s an example: 
[https://jsfiddle.net/t2ps9huz/](https://jsfiddle.net/t2ps9huz/). The 
‘use’ element doesn’t have width or height, but the ‘symbol’ element 
has. The browsers behave in two different ways.

![symbol-pic](https://cloud.githubusercontent.com/assets/6185066/15357245/4adc628e-1d06-11e6-91e8-dc4f46a3a62e.png)

Option 1: Safari / Edge - uses 100% x 100%, ignores the symbol ‘width’
 and ‘height’
Option 2: Firefox / Chrome - uses the symbol ‘width’ and ‘height’ 
(50x50)

It would be nice to know which one is the correct behavior so that I 
can file bugs for the browsers. I would prefer option 2 to be the 
correct behavior, because it would allow defining default width and 
height values for symbols.

The example as an attachment: 
[symbols.svg.txt](https://github.com/w3c/svgwg/files/270428/symbols.svg.txt)



See https://github.com/w3c/svgwg/issues/142

Received on Sunday, 7 August 2016 22:39:46 UTC