{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/svgwg/issues/193","repository_url":"https://api.github.com/repos/w3c/svgwg","labels_url":"https://api.github.com/repos/w3c/svgwg/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/w3c/svgwg/issues/193/comments","events_url":"https://api.github.com/repos/w3c/svgwg/issues/193/events","html_url":"https://github.com/w3c/svgwg/issues/193","id":164209272,"number":193,"title":"Clarify effect of invalid values for width & height on <use> elements","user":{"login":"AmeliaBR","id":9876129,"avatar_url":"https://avatars.githubusercontent.com/u/9876129?v=3","gravatar_id":"","url":"https://api.github.com/users/AmeliaBR","html_url":"https://github.com/AmeliaBR","followers_url":"https://api.github.com/users/AmeliaBR/followers","following_url":"https://api.github.com/users/AmeliaBR/following{/other_user}","gists_url":"https://api.github.com/users/AmeliaBR/gists{/gist_id}","starred_url":"https://api.github.com/users/AmeliaBR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmeliaBR/subscriptions","organizations_url":"https://api.github.com/users/AmeliaBR/orgs","repos_url":"https://api.github.com/users/AmeliaBR/repos","events_url":"https://api.github.com/users/AmeliaBR/events{/privacy}","received_events_url":"https://api.github.com/users/AmeliaBR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/w3c/svgwg/labels/Document%20structure%20chapter","name":"Document structure chapter","color":"009800"},{"url":"https://api.github.com/repos/w3c/svgwg/labels/Needs%20resolution","name":"Needs resolution","color":"006b75"},{"url":"https://api.github.com/repos/w3c/svgwg/labels/SVG%202","name":"SVG 2","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"AmeliaBR","id":9876129,"avatar_url":"https://avatars.githubusercontent.com/u/9876129?v=3","gravatar_id":"","url":"https://api.github.com/users/AmeliaBR","html_url":"https://github.com/AmeliaBR","followers_url":"https://api.github.com/users/AmeliaBR/followers","following_url":"https://api.github.com/users/AmeliaBR/following{/other_user}","gists_url":"https://api.github.com/users/AmeliaBR/gists{/gist_id}","starred_url":"https://api.github.com/users/AmeliaBR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmeliaBR/subscriptions","organizations_url":"https://api.github.com/users/AmeliaBR/orgs","repos_url":"https://api.github.com/users/AmeliaBR/repos","events_url":"https://api.github.com/users/AmeliaBR/events{/privacy}","received_events_url":"https://api.github.com/users/AmeliaBR/received_events","type":"User","site_admin":false},"assignees":[{"login":"AmeliaBR","id":9876129,"avatar_url":"https://avatars.githubusercontent.com/u/9876129?v=3","gravatar_id":"","url":"https://api.github.com/users/AmeliaBR","html_url":"https://github.com/AmeliaBR","followers_url":"https://api.github.com/users/AmeliaBR/followers","following_url":"https://api.github.com/users/AmeliaBR/following{/other_user}","gists_url":"https://api.github.com/users/AmeliaBR/gists{/gist_id}","starred_url":"https://api.github.com/users/AmeliaBR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmeliaBR/subscriptions","organizations_url":"https://api.github.com/users/AmeliaBR/orgs","repos_url":"https://api.github.com/users/AmeliaBR/repos","events_url":"https://api.github.com/users/AmeliaBR/events{/privacy}","received_events_url":"https://api.github.com/users/AmeliaBR/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/w3c/svgwg/milestones/1","html_url":"https://github.com/w3c/svgwg/milestones/CR","labels_url":"https://api.github.com/repos/w3c/svgwg/milestones/1/labels","id":1737671,"number":1,"title":"CR","description":"","creator":{"login":"nikosandronikos","id":4891471,"avatar_url":"https://avatars.githubusercontent.com/u/4891471?v=3","gravatar_id":"","url":"https://api.github.com/users/nikosandronikos","html_url":"https://github.com/nikosandronikos","followers_url":"https://api.github.com/users/nikosandronikos/followers","following_url":"https://api.github.com/users/nikosandronikos/following{/other_user}","gists_url":"https://api.github.com/users/nikosandronikos/gists{/gist_id}","starred_url":"https://api.github.com/users/nikosandronikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikosandronikos/subscriptions","organizations_url":"https://api.github.com/users/nikosandronikos/orgs","repos_url":"https://api.github.com/users/nikosandronikos/repos","events_url":"https://api.github.com/users/nikosandronikos/events{/privacy}","received_events_url":"https://api.github.com/users/nikosandronikos/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":46,"state":"open","created_at":"2016-04-29T00:11:55Z","updated_at":"2016-07-07T01:17:08Z","due_on":"2016-06-22T22:00:00Z","closed_at":null},"comments":1,"created_at":"2016-07-07T01:17:08Z","updated_at":"2016-07-07T02:17:27Z","closed_at":null,"body":"The SVG 1.1 specs say, with regards to width + height on `<use>`:\r\n\r\n> A negative value is an error (see Error processing). A value of zero disables rendering of this element.\r\n\r\nNothing very surprising about that. The same text is used for pretty much every other shape that takes `width` and `height` values.\r\n\r\nBut there are two problems:\r\n\r\n- Any other value of `width` and `height` doesn't actually have any effect on the rendering of the re-used graphics if the `<use>` references anything that isn't `<svg>` or `<symbol>`.\r\n\r\n- Current implementations are so inconsistent it's funny.\r\n\r\nDemo for testing current browser implementations: http://jsbin.com/tixihodafe/1/edit?html,css,output\r\nOr download [a zip of a stand-alone SVG version](https://github.com/w3c/svgwg/files/351182/use-width-height-error.zip)\r\n\r\n\r\n\r\n\r\nFor re-used basic shapes, Chrome, Edge, Safari, and Inkscape happily render the shapes regardless of width/height values.  However, Firefox follows the spec to the letter and does not render when width & height are 0 or negative.\r\n\r\nFor symbols, I would expect that invalid values of width & height mean no rendering.  In Firefox, once again that's true.  In Chrome, Edge and Inkscape, the 0 values effectively mean no rendering.  \r\n\r\nBut negative values are fun.  \r\nEdge and Inkscape apply a negative scaling factor, so that the symbol gets reflected to the opposite side of its positioning point.  Chrome just ignores the negative value as if it wasn't specified (so that the symbol gets width/height  of 100%).  \r\n\r\nFinally, Safari ignores _both_ the negative values and the zero values, using 100% in either case.\r\n\r\n***So...***  my recommendation, and what I'm using in the text I'm drafting: \r\n\r\nDefine valid values of width & height on `<use>` purely through their effect on the rendered content.  If the attributes don't have an effect (because the re-used content is a simple shape or a `<g>`), don't worry about error checking.  If the re-used content is a `<symbol>` or a `<svg>`, *and* it doesn't have its own width/height specified, then a value of 0 disables rendering, the same as it would if set on the symbol/svg itself.\r\n\r\n(PS, I'm already writing it up so that width & height are valid style properties on `<symbol>`, as discussed in #142, and so that the attributes on the `<use>` element only have an effect if the symbol/svg has a computed value of `auto` for the corresponding style property, regardless of how that property was set in the CSS cascade.)\r\n\r\n***But*** here's the final confusion: \r\n\r\nBecause width & height on most elements have been upgraded to presentation attributes, and because CSS allows invalid negative values to be ignored *at parse time*, if you set a negative height/width directly on an `<svg>`, it should be ignored, and the auto/100% behavior would apply.\r\n\r\nHowever, width & height on the `<use>` element are *not* currently defined as presentation attributes.  They are just regular SVG/XML attributes.  So, we can decide: are negative values ignored as if they were never set (so initial value applies) or are they an error that disables rendering?  I'm leaning towards ignored, so it's consistent with the presentation attribute behavior.  Also, if negative values aren't going to be a render-blocking error when re-using a `<g>`, they really shouldn't be a render-blocking error when re-using an `<svg>`.\r\n\r\nIf you're keeping score, that means that I'm suggesting that the Blink behavior would be correct, & everyone else would need to change something.\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/svgwg/issues/comments/230961536","html_url":"https://github.com/w3c/svgwg/issues/193#issuecomment-230961536","issue_url":"https://api.github.com/repos/w3c/svgwg/issues/193","id":230961536,"user":{"login":"AmeliaBR","id":9876129,"avatar_url":"https://avatars.githubusercontent.com/u/9876129?v=3","gravatar_id":"","url":"https://api.github.com/users/AmeliaBR","html_url":"https://github.com/AmeliaBR","followers_url":"https://api.github.com/users/AmeliaBR/followers","following_url":"https://api.github.com/users/AmeliaBR/following{/other_user}","gists_url":"https://api.github.com/users/AmeliaBR/gists{/gist_id}","starred_url":"https://api.github.com/users/AmeliaBR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmeliaBR/subscriptions","organizations_url":"https://api.github.com/users/AmeliaBR/orgs","repos_url":"https://api.github.com/users/AmeliaBR/repos","events_url":"https://api.github.com/users/AmeliaBR/events{/privacy}","received_events_url":"https://api.github.com/users/AmeliaBR/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T02:17:27Z","updated_at":"2016-07-07T02:17:27Z","body":"OK, great.  So if the prose says non-negative length, that's enough to make it a parse error, same as for the CSS properties.\r\n\r\nI think I can make this make sense now..."}}
{"actor":{"display_login":"AmeliaBR"}}