Answer the question
In order to leave comments, you need to log in
Px to Rem how to use?
Actually, I tried two gallp plugins today, but they didn’t take off for me.
Maybe someone already uses such a bunch, share the task.
How would it be more convenient to typeset in PX, but I want to achieve a better display of the site.
Yes, and it took recently to make a version for the visually impaired and the site collapsed ugly.
In html, I usually have 16px or 14px.
Answer the question
In order to leave comments, you need to log in
Well, here's the basic outline.
$root-font-size: 16px;
@function rem($size) {
@return $size / $root-font-size * 1rem;
}
html {
font-size: ($root-font-size / 16px) * 100%;
}
.some-block {
font-size: rem(24px);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question