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

Fixed: remove non standard CSS property “zoom” #4276

Closed
laryn opened this issue Jan 16, 2020 · 6 comments · Fixed by backdrop/backdrop#3145
Closed

Fixed: remove non standard CSS property “zoom” #4276

laryn opened this issue Jan 16, 2020 · 6 comments · Fixed by backdrop/backdrop#3145

Comments

@laryn
Copy link
Contributor

laryn commented Jan 16, 2020

Description of the bug
In the developer console I often see this on Drupal 7 and Backdrop sites:

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.

The Mozilla docs say:

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

A search of the codebase suggests there's one usage of this in the system.css file. Do we need it?


PR: backdrop/backdrop#3145

@ghost
Copy link

ghost commented Jan 28, 2020

Looks like it's used for IE7 support. Are we still supporting that...?

@laryn
Copy link
Contributor Author

laryn commented Jan 28, 2020

Don't think so? Also, IE7 has 0.01% of market share, so probably safe to ax this line in the CSS.

@klonos
Copy link
Member

klonos commented May 19, 2020

I don't have any strong opinion on this one. https://caniuse.com/#feat=css-zoom says that 93.79% of globally-used browsers support the property:

Screen Shot 2020-05-19 at 10 54 11 pm

It seems that it is supported by every current version of all popular browsers, with the exception of Firefox (4% global usage), Firefox mobile (0.23%), and Opera mini (0.69%) - so ~5% of users really.

We could invoke our 3rd principle "Focus: Include features for the majority."

Backdrop core should only include features and tools that benefit the majority of sites that are running it.

The oxymoron here is that we have this bit of code in place in order to serve a browser that has less than 0.02% usage:

Screen Shot 2020-05-19 at 11 07 37 pm

...yet this error is thrown by browsers that are the least used globally - none of the popular browsers will complain about the usage of zoom 😅

@indigoxela
Copy link
Member

Yes, please let's get rid of that silly "zoom:" - the browser this workaround was necessary for is dead and gone for so long now.
(I admit, I danced on its grave 😈)

@ghost
Copy link

ghost commented Sep 15, 2021

Thanks @laryn and @klonos. I've merged backdrop/backdrop#3145 into 1.x.

@ghost
Copy link

ghost commented Sep 15, 2021

I don't feel this is an important enough change to worry about also merging it into 1.19.4...

@jenlampton jenlampton changed the title Non standard property “zoom” [CSS] Fixed: remove non standard CSS property “zoom” Sep 15, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants