Answer the question
In order to leave comments, you need to log in
What are the units for offsets?
In this example, the icon (to the left of the text) is absolutely positioned in pixels. And somehow my brain suddenly began to break down that probably in this situation it would be correct to use rem. Is it so? Considering that this icon is a component of a block with text - in theory, its size, indents, etc. should line up depending on the size of the text? Or would it be better to do it as a percentage?
Answer the question
In order to leave comments, you need to log in
Everything is just outrageous.
If this indent should change when the font size of the root element changes, then in rem.
If it depends on the current font, then em.
If it does not depend on anything and is always constant, then in px.
Well, as for me, what's the difference. The main thing is the result
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question