WebKit / standards-positions

WebKit's positions on emerging web specifications
https://webkit.org/standards-positions/
242 stars 19 forks source link

Standardized CSS zoom #311

Open yotam-hacohen opened 8 months ago

yotam-hacohen commented 8 months ago

WebKittens

No response

Title of the spec

Add a definition of the zoom CSS property

URL to the spec

https://github.com/w3c/csswg-drafts/pull/9699

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

No response

Mozilla standards-positions issue URL

No response

WebKit Bugzilla URL

No response

Radar URL

No response

Description

Aligns the existing implementation of the previously non-standard CSS zoom property to align with the new standard. This changes various JS APIs to align with the spec (see design doc), change zoom to apply to iframes, and change it to apply to all inherit length properties (currently it only changes inherited font-size)

annevk commented 8 months ago

Ah, the logical successor to #170.

Given WebKit participated in the CSS WG discussion I don't think there's any controversy here. Although obviously it will depend on how close the standardized feature is to what is already implemented, given the existing deployment.

yoavweiss commented 7 months ago

It seems like there are some compatibility issues related to getBoundingClientRect() changing behavior and returning zoomed values. We're in the process of figuring those out as part of the Blink shipping process.

karlcow commented 7 months ago

from the tests on

And the testcase https://jsfiddle.net/itchernowitz_gmail/qot2L7ye/ The tip of the arrow is aligned with the drawing in WebKit and Blink, but not in Firefox.

Same. Probably I need to activate the new zoom in Chrome but I can't see that from chrome://flags/

yoavweiss commented 7 months ago

You need to use the command line flag --enable-blink-features=StandardizedBrowserZoom in order to see this in Chromium.