How do some sites prohibit changing the font size?

I almost always browse webpages with a much larger font size than the default. This makes reading easier.

But from time to time, I notice that some websites do not allow font enlargement, at least in Chrome. Like this website for example:

http://en.support.wordpress.com/domains/map-existing-domain/

I'm curious how (a) why Chrome allows sites to do this, and (b) how it is done.

Can someone explain?

+3
source share
2 answers

a) Does God know because browser vendors like to implement things that are inevitably violent?

b) -webkit-text-size-adjust is the culprit. See Also in MDN and the previous question.

+2
source

This is a WebKit error.

-webkit-text-size-adjust should only affect mobile browsers.

But if you set -webkit-text-size-adjust to none , it (erroneously) affects WebKit browsers on the desktop (e.g. Chromium / Chrome and Safari).

Here is the error report : https://bugs.webkit.org/show_bug.cgi?id=56543

+1
source

Source: https://habr.com/ru/post/921526/


All Articles