Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REM size not being updated even though I set html font-size

Tags:

css

font-size

I have set the html and body to 15px.

enter image description here

And afterwards I have set some padding of an element to 1rem, which should translate to 15px. But instead it's giving me 16px...

enter image description here

Any idea why?

--

Browser: Google Chrome. MacOS.
CSS: Stylus
Framework: Vue.js + NUXT

like image 626
mesqueeb Avatar asked May 22 '18 05:05

mesqueeb


1 Answers

The answer is to also set the following:

:root {
    font-size: 15px;
}
like image 190
mesqueeb Avatar answered Sep 28 '22 01:09

mesqueeb