CSS units have been the subject of several articles here on SitePoint (such as A Look at Length Units in CSS , The New CSS3 Relative Font Sizing Units , and The Power of em Units in CSS ). In this article, we increase the count by having an in-depth look at rem units , which have excellent browser support and a polyfill if you need support for old IE. This article was updated in December, 2019 to reflect the current state of rem unit sizing with CSS. For more on CSS font and text properties, read our book, CSS Master, 2nd Edition . What Are rem Units? You might have encountered the term “R.E.M.” before while listening to the radio or your music player. Unlike their musical counterparts, named for the “Rapid Eye Movement” during deep sleep, in CSS rem stands for “root em”. They won’t make you lose your religion nor believe in a man on the moon. What they can do is help you achieve a harmonious and balanced design. According to the W3C spec the definition for one rem unit is: Equ...
Comments
Post a Comment