[csswg-drafts] [css-sizing] Define sizing of SVG Boxes with intrinsic aspect-ratio but no intrinsic size, in an auto-sized shrink-wrap parent

FremyCompany has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-sizing] Define sizing of SVG Boxes with intrinsic aspect-ratio
 but no intrinsic size, in an auto-sized shrink-wrap parent ==
> If 'height' and 'width' both have computed values of 'auto' and the 
element has an intrinsic ratio but no intrinsic height or width, then 
the used value of 'width' is undefined in CSS 2.2. 
> However, it is suggested that, if the containing block's width does 
not itself depend on the replaced element's width, then the used value
 of 'width' is calculated from the constraint equation used for 
block-level, non-replaced elements in normal flow. 
> https://drafts.csswg.org/css2/visudet.html#inline-replaced-width

Browsers seem to follow the recommendation when it applies, but the 
undefined behavior is not 100% interoperable though most browsers 
(Edge / Chrome / Safari) seem to fallback to the "default object 
width" and compute the height using the aspect ratio. 

https://jsfiddle.net/2y31ru8u/

Maybe time to define an actual behavior? 
cc @dbaron @fantasai 

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/951 using your GitHub 
account

Received on Tuesday, 17 January 2017 18:20:40 UTC