D
D
DeniSidorenko2017-09-18 22:56:23
css
DeniSidorenko, 2017-09-18 22:56:23

How to calculate rem?

Good afternoon. Decided to use rem in a new project. As you know, I set html{ font-size : 16px}
And now one rem = 16px, 32px = 2 rem. However, for example, I have 24px in Photoshop. To do this, I need to constantly calculate 24/16 = 1.5rem with a calculator. It is not always convenient to sit next to a calculator. However, I'm using STYLUs and there are mixins, functions, etc. It's possible to create auto mixins. calculations and converting px to rem

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Karapetyan, 2017-09-18
@DeniSidorenko

Google
first link in google

A
archelon, 2017-09-19
@archelon

html{font-size : 10px}
and it will be easy to count

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question