- From: Ian Kilpatrick via GitHub <sysbot+gh@w3.org>
- Date: Thu, 06 May 2021 16:27:06 +0000
- To: public-svg-issues@w3.org
bfgeek has just created a new issue for https://github.com/w3c/svgwg:
== Behaviour of degenerate aspect-ratios. ==
In https://svgwg.org/svg-next/single-page.html#coords-SizingSVGInCSS
https://drafts.csswg.org/css-values-4/#degenerate-ratio
The spec talks about when to fallback to using the viewBox for the aspect-ratio. However we don't have interop when the width/height attributes specify a degenerate aspect-ratio. E.g.
```html
<!DOCTYPE html>
<img style="width: 100px; border: solid; background: lime;" src="
data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='0px' height='50px' viewBox='0 0 1 1'></svg>">
```
What should happen in this case?
FF currently does:
intrinsic-size: 0x50, aspect-ratio: null
Blink/WebKit
intrinsic-size: 0x50, aspect-ratio: 1/1
Currently with the new CSS `aspect-ratio` property for degenerate aspect-ratios, e.g:
`aspect-ratio: 0/50` will fallback to the intrinsic aspect-ratio if specified.
I think as per the spec at the moment, FF is kinda correct, but the spec doesn't specify what should happen with degenerate aspect-ratios. Blink/WebKit matches the "fallback if degenerate" precedent.
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/848 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 6 May 2021 16:27:12 UTC