Units
A Unit determines the size of a property you are setting for an element or its content. It can be Relative or Absolute.
Whether to use Relative or Absolute Units is determined by:
Whether you want what you are styling to scale when the viewport size changes.
What you want it to scale relative to.
Absolute Unit
An Absolute Unit stays the same size even if the parent element or window size changes. If you change between screen sizes, an Absolute Unit will always stay the same size.
Relative Unit
It is important to choose the most appropriate option for the property you are targetting.
A Relative Unit scales relative to the parent or window size. This makes it useful for styling responsive sites.
Units Shortcut
The Units Shortcut property allows you to input a new unit without having to select it in the dropdown. This saves time and improves your workflow.
For instance, if you want to change a Font unit to em, simply input "em" after the numeric value and it will be applied.
Find property to which you want to change the unit.
Write in new unit, for example "em".
The new unit will be automatically applied without having to search through the dropdown.
Last updated