Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an option in chrome devtools (or other browsers) to temporary change browser's main font-size?

I have set the :root {font-size: 10px} property to use rems or pixels as units for users, that scales the browser's font (Chrome example: Settings => Appearance => Font Size = Large). So every time I want to see how chosen units affects UI, I need to go to settings and apply different font scales. Also it affects all tabs and I want to avoid this behavior.

Is there a simple way to do this instead of getting into the browser's settings?

[upd]

  1. ctrl+ / ctrl- does not work the same as font scale in browser, which i'm asking about.
  2. I know how to change scale in settings, i'm asking for an options to quickly change it in devtools.

[upd] difference between zoom and browser's font size

like image 706
Nick Annenkov Avatar asked Sep 16 '25 04:09

Nick Annenkov


2 Answers

All of you who advise zooming the browser via ctrl+ and similar, open your apps on android mobile and change the font size in the mobile settings, and see what it did to the appearance of your apps. So you will figure out what is the subject of the above question.

like image 125
bmi Avatar answered Sep 17 '25 20:09

bmi


Edited: since the question is about DevTools.

In the Styles pane, you can apply font-size values like medium, large etc on the body tag. It seems to work pretty much the same way the Browser's Font size setting works.

enter image description here

like image 20
Pankaj Parashar Avatar answered Sep 17 '25 20:09

Pankaj Parashar