Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-zoom?] Zoom and replaced element intrinsic dimensions #9442

Closed
emilio opened this issue Oct 5, 2023 · 3 comments
Closed

[css-zoom?] Zoom and replaced element intrinsic dimensions #9442

emilio opened this issue Oct 5, 2023 · 3 comments

Comments

@emilio
Copy link
Collaborator

emilio commented Oct 5, 2023

The zoom property has an effect on intrinsic element dimensions (live, another demo):

<!DOCTYPE html>
<style>
p { zoom: 2 }
</style>
<p><img src=image>

That is fine and all, because it matches what you'd get if you specified the size with width and height (because those would go through the attribute mapping stuff etc).

But I don't think it's explained/defined in https://github.com/atanassov/css-zoom/ or so. What other side-effects does Zoom have? Does it apply to all replaced elements? Presumably it should, since their intrinsic size works in CSS pixels as well?

cc: #5623 @chrishtr @lilles @smfr @tabatkins @atanassov @zcorpan

@chrishtr
Copy link
Contributor

chrishtr commented Oct 6, 2023

It does apply to all replaced elements. There is currently a bug in Chromium that zoom from a document doesn't follow through to iframes, but I plan to fix it soon.

@zcorpan
Copy link
Member

zcorpan commented Oct 9, 2023

Also needs to affects size of background images for web compat: https://bugzilla.mozilla.org/show_bug.cgi?id=390936#c106

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-zoom?] Zoom and replaced element intrinsic dimensions, and agreed to the following:

  • RESOLVED: Apply zoom to all replaced elements and to background images
The full IRC log of that discussion <frances_> Alan: onto issue #9442
<frances_> chris h: replaced elements in general, zoom is taken in account on replaced elements and background images
<frances_> Ian: spec proposed natural size
<frances_> chris h: zoom of 2 would default to twice the size because natural size doubled
<frances_> chris h: as an example
<fantasai> +1
<frances_> Alan: unspecified?
<frances_> chris h: the current behavior is not a fully specified css property, possibly not a compat risk
<frances_> alan: Does Amelia know?
<frances_> Chris: yes
<vmpstr> q+
<florian> s/Amelia/Emilio/
<frances_> Alan: Any other comments?
<astearns> ack vmpstr
<frances_> Vladimir: if we are doubling the natural size, be careful in natural size container and containing the size, possible spec confusion
<frances_> chris h: interpret to apply contain size and multiply by 2
<frances_> florian: should not do it instead whether first or last
<frances_> chris: good point
<frances_> Alan: anything else?
<frances_> PROPOSAL: Apply zoom to all replaced elements and to background images
<frances_> RESOLVED: Apply zoom to all replaced elements and to background images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants