- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 May 2021 16:35:46 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-images] Behaviour of SVG degenerate aspect-ratios`. <details><summary>The full IRC log of that discussion</summary> <dael> Topic: [css-images] Behaviour of SVG degenerate aspect-ratios<br> <lea> I will reiterate that using CSSColorValue as input is not something that needs to be explicitly added to a spec, as long as it serializes<br> <dael> github: https://github.com/w3c/csswg-drafts/issues/6286<br> <dael> iank_: Digging into replaced elements. Series of test cases in grid repo that is probing this and there's a subtle difference in impl<br> <dael> iank_: If you go to SVG issue it contins example in 1st comment. When embed SVG in image need to know svg intrinsic size and aspect-ratio<br> <dael> iank_: svg are unique in you can have one or the other or both. FF has intrinsic but no a-r.<br> <dael> iank_: Blink and Gecko has both<br> <dael> iank_: Specific exampl,e have width 0px, height 50px. Viewbox says a-r is 1-1<br> <dael> iank_: FF have intrinsic 0x50 which matches. a-r is different<br> <dael> iank_: FF does one interpretation where treats a-r as degenerate and null. Blink and WK go this is degenerate so fallback to viewbox<br> <TabAtkins> example: <img width=100px src="<svg viewBox='0 0 1 1' width='0' height='50px'>"><br> <dael> iank_: That's the crux of the issue<br> <TabAtkins> what is the <img>'s height?<br> <astearns> ack fantasai<br> <dael> fantasai: If in general case have width of 1px rather than 0 we will ignore viewbox and use a-r from width and height?<br> <dael> iank_: Correct<br> <dael> fantasai: b/c it's degenerate blink fallsback to viewbox<br> <dael> iank_: Correct. Written down in the css spec. Linked to SVG text but it's same text.<br> <fantasai> s/fallsback to viewbox/falls back to viewbox, and gecko continues to ignore viewbox/<br> <dael> iank_: I don't think when algo was written it considered that width and height could result in degenerate a-r<br> <dael> fantasai: Yeah, I don't htink we considered this<br> <dael> iank_: You can also spec width -50px and get same behavior<br> <dael> fantasai: I have no opinion of what we out to do here. Don't think it matters for authoring. Would be interested to know what Amelia thinks<br> <TabAtkins> I too have no real opinion on how we resolve this. Both behaviors seem reasonable.<br> <dael> iank_: Yeah, tagged Amelia on the SVG but haven't received a response<br> <dael> fantasai: Is there a reason to do one or the other?<br> <dael> iank_: Not particularly. Could argue blink/WK is slightly better in that we use an a-r when it's available. But really I don't expect authors to write this. Only reason I'm bringing it up is there's 6 test cases asserting a behavior, I think written by a Gecko engineer. Not clear those tests are right<br> <dael> fantasai: Yeah, should clarify<br> <dael> fantasai: As long as we can't think of a reason my inclination is let Amelia read and make a decision for us<br> <dael> fantasai: I can ping her<br> <dael> iank_: Anyone else with thoughts?<br> <dael> astearns: This is just what to do in this edge case and theres no real world changes we can think of that would result from this?<br> <dael> iank_: Correct. Not addressing b/c a bug. Going through grid test suite and noticed this edge case was unclear<br> <dael> astearns: Happy going with Amelia but also happy going with 2/3 of engines went this way so let's spec<br> <dael> astearns: Leave until Amelia comes?<br> <dael> fantasai: Or resolve to do whatever she says<br> <dael> astearns: Objects?<br> <dael> chrishtr: Question<br> <dael> chrishtr: Did we discuss if degenerate cases in non-svg handled same?<br> <dael> fantasai: 2 sourses of info for a-r. most image formats don't have that confusion. We have general degenerate case, but here is when hit in more primary source of information. Do we fall back to secondary?<br> <dael> iank_: Some precedent in a-r where if you specific degenerate it falls back to images a-r I believe<br> <dael> iank_: Is that right?<br> <dael> fantasai: Don't remember off top of head but I think we decided that to match SVG<br> <fantasai> "If the <ratio> is degenerate, the property instead behaves as auto."<br> <dael> iank_: With that small amount of precedent then Blink/WK behavior you can tie together. a-r behavior is if it's degenerate it falls back to next best thing<br> <dael> astearns: Did that answer question?<br> <dael> chrishtr: What I heard is it's much more uncommon because images are unlikely to have 0 height<br> <dael> fantasai: Not a real world case<br> <iank_> https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=9292<br> <dael> chrishtr: b/c SVG is replaced leemnt it behaves different<br> <dael> iank_: Example ^ showing fallback for a-r property. I spec degenerate where it will use the images a-r<br> <dael> iank_: That's the fallback. If we want a-r to have this fallback being more consistent then blink/wk fallback makes more sense<br> <cbiesinger> I mean, for a while a-r: 1/0 was a parse error<br> <dael> astearns: Given that bit of consistency shall we resolve on Blink/WK and see if Amelia objects?<br> <cbiesinger> but I think that was changed for consistency with calc() that computes to zero<br> <fantasai> and then changed to 'auto' because that's what SVG does, IIRC ...<br> <dael> dholbert: I weakly lean against that. Feel like with a-r property if you're explicitly providing invalid it makes sense to not do anything. In SVG we've got a usable height and width and it makes sense that does establish a value to use<br> <dael> iank_: You can also spec -10px width and has same behavior. And you don't render at -10<br> <dael> dholbert: True. More that a-r is downstream. Don't feel too strongly. Feels a little weird adding a special fallback that no one will need for real content. I think it's a trivial change<br> <dael> fantasai: I think we should wait and hear back from Amelia. She might have SVG logic that leans one way<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6286#issuecomment-844273460 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 19 May 2021 16:36:03 UTC