Do you only use pixels or % in CSS? Open yourself to more possibilities and best practices with other available units.
- Each unit has its own use cases and best practices.
- I love using
remas it's a scalable unit and consistent across devices (if proper media queries are set in root HTML element). Also, a lot of duplication is removed as e.g. font is changed in one place.
viewportunits can be a good solution for full-page screens and other scenarios where you need to take viewport size into consideration.