- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 29 Nov 2023 17:42:26 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-zoom?] Zoom and inheritance. `, and agreed to the following: * `RESOLVED: font-size is not special wrt zoom` * `RESOLVED: All computed absolute lengths are zoomed when inheriting` <details><summary>The full IRC log of that discussion</summary> <fantasai> emilio: This one is tricky<br> <fantasai> emilio: mostly due to the way zoom implemented, inheritance behaves really oddly<br> <fantasai> emilio: webkit and blink have a special case, if you apply zoom to an element<br> <fantasai> emilio: they zoom inherited font-size but not any other inherited property<br> <fantasai> emilio: seems the consensus is either zoom all the inherited lengths or we don't zoom any of them<br> <fantasai> emilio: I think it's clear that ideal behavior is zooming all inherited lengths<br> <fantasai> emilio: but I am worried, especially about perf cost, when you have lots of tiny elements with zoom<br> <fantasai> emilio: which I have seen in the wild while working on this<br> <Rossen_> q?<br> <fantasai> fantasai: [example of p { font-size: 10px; zoom: 2; } ]<br> <Rossen_> ack fantasai<br> <fantasai> fantasai: if inheriting unzoomed font-size, as soon as I put a SPAN in the paragraph, it will have 10px font-size<br> <fantasai> emilio: that works due to UA magic<br> <fantasai> emilio: what you inherit is 20px<br> <fantasai> emilio: if you have a span inside that has zoom as well<br> <fantasai> emilio: that will get font-size of 20px, instead of 40px as you expect<br> <fantasai> emilio: right now WebKit and Blink will zoom font-size correctly, but not e.g. line-height<br> <fantasai> emilio: that's messed up<br> <chrishtr> q+<br> <fantasai> emilio: so it's edge-casy but... on the other hand it's unfortunate that it doesn't work<br> <fantasai> emilio: I'd rather remove the font-size special case<br> <fantasai> emilio: no property does magic inherited value<br> <fantasai> emilio: I'd be fine with zooming every inherited length, just concerned about performance<br> <fantasai> Rossen_: Not understanding perf issue, let's make sure we have at least the right user-expected behavior before considering potential perf<br> <fantasai> Rossen_: prefer to measure and then discuss<br> <fantasai> Rossen_: I am unclear with your proposal what would happen to 'em' resolution<br> <fantasai> emilio: it has no effect from existing behavior<br> <fantasai> Rossen_: so if I have a 1em height, it'll be 40px or 20px or 10px?<br> <fantasai> emilio: it would be whatever the font-size is<br> <fantasai> Rossen_: what do we want to have, from user PoV<br> <fantasai> emilio: relative lengths reflect final zoomed font-size<br> <fantasai> Rossen_: I didn't want to make font-size exceptional here<br> <fantasai> emilio: that's my proposal<br> <Rossen_> ack chrishtr<br> <fantasai> chrishtr: I feel like from the user point of view, making it apply to all inherited lengths makes sense<br> <fantasai> chrishtr: so I do think I would recommend resolving to do all inherited value<br> <fantasai> chrishtr: if during implementation we come up with an unaviodable perf problem, can discuss again<br> <fantasai> emilio: I'm ok with that<br> <fantasai> emilio: can we resolve in any case, don't make font-size special<br> <fantasai> RESOLVED: font-size is not special wrt zoom<br> <fantasai> emilio: other issue with chrishtr's proposal to zoom all computed values is<br> <fantasai> emilio: you need to figure out what to do with all those, whether it's fine if those px values came from relative lengths<br> <fantasai> emilio: assuming fine, then seems fine<br> <dholbert> fantasai (IRC): relative lengths are all absolutized before they're inherited<br> <dholbert> fantasai (IRC): if your font size changes and you wanted ems, then you wanted ems and they'll get converted to absolute size<br> <dholbert> emilio (IRC): I think it's ok<br> <dholbert> ScribeNick: dholbert<br> <Rossen_> ack fantasai<br> <fantasai> PROPOSED: All computed lengths are zoomed when inheriting<br> <dholbert> fantasai (IRC): more precisely, when you absolutize a length to make a computed value, you apply a zoom. You have to undo that for getComputedStyle<br> <dholbert> fantasai (IRC): this is needed for animation to work<br> <dholbert> emilio (IRC): that's how impls work now<br> <dholbert> emilio (IRC): tricky thing is when you're inheriting into a thing with a different zoom<br> <dholbert> emilio (IRC): then you apply the zoom of the thing you're inheriting to on top, and that's this resolution<br> <dholbert> fantasai (IRC): that seems like the right thing to do<br> <dholbert> emilio (IRC): i agree from a user perspective. skeptical that we can make it fast but happy to try<br> <dholbert> chrishtr (IRC): proposed resln is all computed lengths, but we should exclude percentages<br> <vmpstr> q+<br> <dholbert> emilio (IRC): all computed absolute lengths, let's say<br> <Rossen_> ack vmpstr<br> <dholbert> vmpstr (IRC): concretely, if I have width:100px and zoom:2 and a child that inherits that width, it would inherit 200px?<br> <dholbert> emilio (IRC): that already happens<br> <dholbert> emilio (IRC): the issue is when zoom is specified on the child. then what's the width of the child<br> <dholbert> emilio (IRC): with this resolution, it would be 200<br> <chrishtr> thanks!<br> <dholbert> RESOLVED: All computed absolute lengths are zoomed when inheriting<br> <chrishtr> I don't see the resolution recorded in the issue yet?<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9397#issuecomment-1832408851 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 29 November 2023 17:42:28 UTC