{"id":375815,"date":"2024-06-03T12:22:02","date_gmt":"2024-06-03T19:22:02","guid":{"rendered":"https:\/\/css-tricks.com\/?p=375815"},"modified":"2024-08-27T14:46:10","modified_gmt":"2024-08-27T20:46:10","slug":"css-length-units","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/css-length-units\/","title":{"rendered":"CSS Length Units"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h2 id=\"overview\" class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Many CSS properties accept numbers as values. Sometimes those are whole numbers. Sometimes they&#8217;re decimals and fractions. Other times, they&#8217;re percentages. Whatever they are, the unit that follows a number <a href=\"https:\/\/css-tricks.com\/computed-values-more-than-meets-the-eye\/\">determines the number&#8217;s computed length<\/a>. And by &#8220;length&#8221; we mean any sort of distance that can be described as a number, such as the physical dimensions of an element, a measure of time, geometric angles&#8230; all kinds of things!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the time of this writing, the <a href=\"https:\/\/drafts.csswg.org\/css-values\/\" rel=\"noopener\">CSS Values and Units Module Level 4 specification<\/a> defines a bunch of different CSS units \u2014 and many of those are <em>relatively<\/em> new (this pun will make sense later).<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column ticss-ccc3ab5c is-layout-flow wp-block-column-is-layout-flow\">\n<h2 id=\"quick-reference\" class=\"wp-block-heading\">Quick Reference<\/h2>\n\n\n\n<div class=\"wp-block-columns ticss-bbf989d1 is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column ticss-be1e6d34 is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Absolute units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">Unit<\/th><th scope=\"col\">Name<\/th><\/tr><\/thead><tbody><tr><td><code>cm<\/code><\/td><td>Centimeters<\/td><\/tr><tr><td><code>mm<\/code><\/td><td>Millimeters<\/td><\/tr><tr><td><code>Q<\/code><\/td><td>Quarter-millimeters<\/td><\/tr><tr><td><code>in<\/code><\/td><td>Inches<\/td><\/tr><tr><td><code>pc<\/code><\/td><td>Picas<\/td><\/tr><tr><td><code>pt<\/code><\/td><td>Points<\/td><\/tr><tr><td><code>px<\/code><\/td><td>Pixels<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Font units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Relative to&#8230;<\/th><\/tr><\/thead><tbody><tr><td>em<\/td><td>The font size of the element, or its nearest parent container<\/td><\/tr><tr><td>ex<\/td><td>The 0-height of the element\u2019s font\u00a0<\/td><\/tr><tr><td>cap<\/td><td>The cap height (the nominal height of capital letters) of the element\u2019s font&nbsp;<\/td><\/tr><tr><td>ch<\/td><td>The width of the <code>0<\/code> character of the font in use<\/td><\/tr><tr><td>ic<\/td><td>The average width of a full glyph of the font in use, as represented by the \u201c\u6c34\u201d (<code>U+6C34<\/code>) glyph<\/td><\/tr><tr><td>rem<\/td><td>The <code>font-size<\/code> value that&#8217;s set on the root (<code>html<\/code>) element<\/td><\/tr><tr><td>lh<\/td><td>The <code>line-height<\/code> value that&#8217;s set on the element&nbsp;<\/td><\/tr><tr><td>rlh<\/td><td>The <code>line-height<\/code> that&#8217;s set on the root (<code>html<\/code>) element&nbsp;<\/td><\/tr><tr><td>vw<\/td><td>1% of viewport\u2019s width<\/td><\/tr><tr><td>vh<\/td><td>1% of viewport\u2019s height<\/td><\/tr><tr><td>vi<\/td><td>1% of viewport\u2019s size in the root element\u2019s&nbsp;inline axis<\/td><\/tr><tr><td>vb<\/td><td>1% of viewport\u2019s size in the root element\u2019s&nbsp;block axis<\/td><\/tr><tr><td>vmin<\/td><td>Equal to 1% of the <code>vw<\/code> or <code>vh<\/code>, whichever is smaller<\/td><\/tr><tr><td>vmax<\/td><td>Equal to 1% of the <code>vw<\/code> or <code>vh<\/code>, whichever is larger<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Viewport units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th><\/th><th><\/th><\/tr><\/thead><tbody><tr><td><code>vw<\/code><\/td><td>1% of viewport\u2019s width<\/td><\/tr><tr><td><code>vh<\/code><\/td><td>1% of viewport\u2019s height<\/td><\/tr><tr><td><code>vi<\/code><\/td><td>1% of viewport\u2019s size in the root element\u2019s&nbsp;inline axis<\/td><\/tr><tr><td><code>vb<\/code><\/td><td>1% of viewport\u2019s size in the root element\u2019s&nbsp;block axis<\/td><\/tr><tr><td><code>vmin<\/code><\/td><td>1% of the <code>vw<\/code> or <code>vh<\/code>, whichever is smaller<\/td><\/tr><tr><td><code>vmax<\/code><\/td><td>1% of the <code>vw<\/code> or <code>vh<\/code>, whichever is larger<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Container units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Relative to<\/th><\/tr><\/thead><tbody><tr><td><code>cqw<\/code><\/td><td>1% of a query container&#8217;s width<\/td><\/tr><tr><td><code>cqh<\/code><\/td><td>1% of a query container&#8217;s height<\/td><\/tr><tr><td><code>cqi<\/code><\/td><td>1% of a query container&#8217;s inline size<\/td><\/tr><tr><td><code>cqb<\/code><\/td><td>1% of a query container&#8217;s block size<\/td><\/tr><tr><td><code>cqmin<\/code><\/td><td>The smaller value of&nbsp;<code>cqi<\/code>&nbsp;or&nbsp;<code>cqb<\/code><\/td><\/tr><tr><td><code>cqmax<\/code><\/td><td>The larger value of&nbsp;<code>cqi<\/code>&nbsp;or&nbsp;<code>cqb<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Angle units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>deg<\/code><\/td><td>There are 360 degrees in a full circle.<\/td><\/tr><tr><td><code>grad<\/code><\/td><td>There are 400 gradians in a full circle.<\/td><\/tr><tr><td><code>rad<\/code><\/td><td>There are 2\u03c0 radians in a full circle.<\/td><\/tr><tr><td><code>turn<\/code><\/td><td>There is 1 turn in a full circle.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Time units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>s<\/code><\/td><td>There are 60 seconds in a minute, but there is no unit for minutes.<\/td><\/tr><tr><td><code>ms<\/code><\/td><td>There are 1,000 milliseconds in a second.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Fractional units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>fr<\/code><\/td><td>One fraction of the free space in a grid container.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<details >\n  <summary>\n          Resolution units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>dpi<\/code><\/td><td>Dots per inch<\/td><\/tr><tr><td><code>dpcm<\/code><\/td><td>Dots per centimeter<\/td><\/tr><tr><td><code>dppx<\/code>,&nbsp;<code>x<\/code><\/td><td>Dots per pixel unit<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n<\/div>\n\n\n\n<details >\n  <summary>\n          Frequency units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>Hz<\/code><\/td><td>Represents the number of occurrences per second<\/td><\/tr><tr><td><code>kHz<\/code><\/td><td>One kiloHertz is equal to 1000 Hertz.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details><\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column ticss-f59d59b9 is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<details open>\n  <summary>\n          <h3>Table of contents<\/h3>\n      <\/summary>\n  \n<ul class=\"simpletoc-list\">\n<li><a href=\"#introduction\">Introduction<\/a>\n<\/li>\n<li><a href=\"#types-of-numbers\">Types of numbers<\/a>\n<\/li>\n<li><a href=\"#absolute-units\">Absolute units<\/a>\n<\/li>\n<li><a href=\"#relative-units\">Relative units<\/a>\n<\/li>\n<li><a href=\"#what-about-unitless-numbers\">What about unit-less numbers?<\/a>\n<\/li>\n<li><a href=\"#we-can-create-our-own-custom-units\">We can create our own custom units!<\/a>\n<\/li>\n<li><a href=\"#when-to-use-one-unit-over-another\">When to use one unit over another<\/a>\n<\/li>\n<li><a href=\"#examples\">Examples<\/a>\n<\/li>\n<li><a href=\"#related-articles\">Related Articles<\/a>\n<\/li><\/ul>\n\n<\/details><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<h3 id=\"introduction\" class=\"wp-block-heading ticss-0ab88c26\">Introduction<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;re going to see a lot numbers in CSS. Here are a few examples?<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">\/* Integers *\/\n1\n\n\/* Pixels *\/\n14px\n\n\/* em *\/\n1.5em\n\n\/* rem *\/\n3rem\n\n\/* Percentage *\/\n50%\n\n\/* Characters *\/\n650ch\n\n\/* Viewport units *\/\n100vw\n80vh\n50dvh\n\n\/* Container units *\/\n100cqi\n50cqb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">While these all mean different things, they essentially do the same thing:&nbsp;<strong>define an element&#8217;s dimensions in CSS<\/strong>. We need units in CSS because they determine how to size elements on a page, whether it&#8217;s the <code>height<\/code> of a box, the <code>width<\/code> of an image, the <code>font-size<\/code> of a heading, the <code>margin<\/code> between two elements, how long an animation runs, etc. Without them, the browser would have no way of knowing how to apply numbers to an element.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, what the heck <em>is<\/em>&nbsp;<code>px<\/code>? What&#8217;s up with this thing called&nbsp;<code>rem<\/code>? How are these different than other length units? <strong>The unit defines what type of number we&#8217;re dealing with, and each one does something different, giving us lots of ways to size things in CSS.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"types-of-numbers\" class=\"wp-block-heading\">Types of numbers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You may think a number is just a number, and you&#8217;re not wrong. Numbers are numbers! But we can distinguish between a few different <em>types<\/em> of numbers, which is helpful context for discussing the different types of units we attach them to since &#8220;number&#8221; can mean, well, a <em>number<\/em> of different things.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Integers<\/strong> (literally a unit-less number, e.g. <code>3<\/code>)<\/li>\n\n\n\n<li><strong>Numbers<\/strong> (same as an integer, only measured in decimals, e.g. <code>3.2<\/code>)<\/li>\n\n\n\n<li><strong>Dimensions<\/strong> (either a number or integer with a unit, e.g. <code>3.2rem<\/code>)<\/li>\n\n\n\n<li><strong>Ratios<\/strong> (the quotient between two divided numbers, e.g. <code>3\/2<\/code>)<\/li>\n\n\n\n<li><strong>Percentages<\/strong> (e.g. <code>3%<\/code>)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Got that? They&#8217;re all numbers but with nuances that make them ever-so-slightly different. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From here, we can think of numbers in CSS as falling into two specific types of <em>units<\/em>:&nbsp;<strong>absolute<\/strong>&nbsp;and&nbsp;<strong>relative<\/strong>. Let&#8217;s start things off our deep dive on CSS length units by breaking those down.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"absolute-units\" class=\"wp-block-heading\">Absolute units<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An&nbsp;<strong>absolute unit<\/strong>&nbsp;is like Bill Murray in the movie&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Groundhog_Day_(film)\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Groundhog Day<\/em><\/a>: it&#8217;s always the same. In other words, whatever the number is, that&#8217;s exactly how it computes in the browser regardless of how other elements are sized.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most common absolute value you&#8217;ll see is the&nbsp;<strong>pixel<\/strong>&nbsp;value. It&#8217;s sort of hard to define, but a pixel is the <em>smallest<\/em> building block of a graphical display, like a computer screen. And it&#8217;s based on the resolution of the screen. So, if you&#8217;re on a super high-resolution screen, a pixel will be smaller than it would be on a low-resolution screen, as the resolution can pack more pixels into a smaller amount of space for higher clarity. But look at the example below. All of the boxes are sized with pixels, so you can get a sense of how large&nbsp;<code>50px<\/code>&nbsp;is compared to&nbsp;<code>250px<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_GREQQMX\" src=\"\/\/codepen.io\/anon\/embed\/preview\/GREQQMX?height=650&amp;theme-id=1&amp;slug-hash=GREQQMX&amp;default-tab=css,result\" height=\"650\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed GREQQMX\" title=\"CodePen Embed GREQQMX\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Absolute values are nice in that they are predictable. That could, however, change in some situations, particularly when it comes to <em>zooming<\/em>. If, say, a user zooms into a page using browser settings, then anything defined with an absolute value is going to increase its absolute size accordingly. So, if the <code>font-size<\/code> of a paragraph is set to <code>20px<\/code>, the paragraph is going to be larger as the user zooms closer into the page. And because zooming is often used to make content more readable, using absolute values that retain their sizing could be a good approach for making pages more accessible by allowing users to zoom things up to a spot that more comfortable to read.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But then again, see Josh Collinsworth&#8217;s click-baity, but fantastic, post titled <a href=\"https:\/\/joshcollinsworth.com\/blog\/never-use-px-for-font-size\" rel=\"noopener\">&#8220;Why you should never use <code>px<\/code> to set <code>font-size<\/code> in CSS&#8221;<\/a> for an exhaustive explanation of how pixels behave when used to set the <code>font-size<\/code> of an element. It&#8217;s a great read to better understand the behavior and limitations of pixel units.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And, hey: pixels are only one of many types of absolute lengths that are available in CSS. In fact, we can group them by the types of things they measure:<\/p>\n\n\n\n<details >\n  <summary>\n          Length units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\"><strong>Length units<\/strong> are a little funny because they can technically be either an absolute unit <em>or<\/em> a relative unit. But we&#8217;re discussing them in absolute terms at the moment and will revisit them when we get further along to relative length units.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A length is essentially a dimension, which is any integer proceeded by a unit, according to the list of types of numbers we looked at earlier. And when we talk about <em>dimensions<\/em>, we&#8217;re really talking about the <em>physical size<\/em> of an element.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Name<\/th><\/tr><\/thead><tbody><tr><td><code>cm<\/code><\/td><td>Centimeters<\/td><\/tr><tr><td><code>mm<\/code><\/td><td>Millimeters<\/td><\/tr><tr><td><code>Q<\/code><\/td><td>Quarter-millimeters<\/td><\/tr><tr><td><code>in<\/code><\/td><td>Inches<\/td><\/tr><tr><td><code>pc<\/code><\/td><td>Picas<\/td><\/tr><tr><td><code>pt<\/code><\/td><td>Points<\/td><\/tr><tr><td><code>px<\/code><\/td><td>Pixels<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What we&#8217;re looking at here are the types of units you might use see on a tape measure (e.g., <code>cm<\/code> and <code>in<\/code>) or in print design (e.g. <code>pc<\/code> and <code>pt<\/code>). They are what they are and what you see is what you get.<\/p>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Angle units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\"><strong>Angle units<\/strong> are purely geometric. They&#8217;re good for setting shape dimensions \u2014 like a circle&#8217;s radius, setting the direction of a <code><a href=\"https:\/\/css-tricks.com\/a-complete-guide-to-css-gradients\/\">linear-gradient()<\/a><\/code>, or setting the how much we want to <a href=\"https:\/\/css-tricks.com\/complete-guide-to-css-functions\/\"><code>rotate()<\/code> <\/a>something.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Name<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>deg<\/code><\/td><td>Degrees<\/td><td>A full circle is equal to <code>360deg<\/code>.<\/td><td><code>rotate(180deg)<\/code><\/td><\/tr><tr><td><code>grad<\/code><\/td><td>Gradiens<\/td><td>A full circle is equal to <code>400grad<\/code>.<\/td><td><code>rotate(200grad)<\/code><\/td><\/tr><tr><td><code>rad<\/code><\/td><td>Radiens<\/td><td>A full circle is equal to <code>2\u03c0<\/code> (i.e., 2 \u00d7 3.14), or about <code>6.2832rad<\/code>.<\/td><td><code>rotate(3.14rad)<\/code><\/td><\/tr><tr><td><code>turn<\/code><\/td><td>Turns<\/td><td>A full circle is <code>1turn<\/code>, like a bicycle wheel making one full rotation.<\/td><td><code>rotate(.5turn)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Time units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\"><strong>Time units<\/strong> are what you&#8217;d expect to find on a clock or watch, but only measure in seconds and milliseconds. Apparently the web cannot be measured in minutes, hours, days, weeks, months, or years. Perhaps we&#8217;ll get a new category of &#8220;calendar units&#8221; at some point, or maybe there&#8217;s no good use case for that sort of thing. &#x1f937;&#x200d;&#x2642;&#xfe0f;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Name<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>s<\/code><\/td><td>Seconds<\/td><td>One full minute of time is equal to <code>60s<\/code>.<\/td><td><code>animation-duration: 2s<\/code><\/td><\/tr><tr><td><code>ms<\/code><\/td><td>Milliseconds<\/td><td>One full second of time os equal to <code>1000ms<\/code>.<\/td><td><code>animation-duration: 2000ms<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Frequency units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\">You won&#8217;t see <strong>frequency units<\/strong> used very often and for good reason: <a href=\"https:\/\/caniuse.com\/mdn-css_types_frequency\" rel=\"noopener\">they&#8217;re not supported by any browser<\/a> at the time of this writing. But they&#8217;re <a href=\"https:\/\/drafts.csswg.org\/css-values\/#frequency\" rel=\"noopener\">specced to change sound frequency<\/a>, such as a sound&#8217;s pitch. The best I can make of it as it currently stands is that frequencies can be used to manipulate an audio file with a higher or lower pitch measured in hertz and kilohertz.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Name<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>Hz<\/code><\/td><td>Hertz<\/td><td>Measures the number of frequencies per second<\/td><td><code><code>&lt;source<\/code> <code>src=\"tubthumping.mp3\"<\/code> <code>type=\"audio\/mpeg\"<\/code> <code>frequency=\"100Hz\"&gt;<\/code><\/code><\/td><\/tr><tr><td><code>kHz<\/code><\/td><td>Kilohertz<\/td><td>A value of <code>1Hz<\/code> is equal to <code>0.001kHz<\/code>.<\/td><td><code><code><code>&lt;source<\/code> <code>src=\"tubthumping.mp3\"<\/code> <code>type=\"audio\/mpeg\"<\/code> <code>frequency=\"0.1kHz\"&gt;<\/code><\/code><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re wondering what constitutes a &#8220;low&#8221; pitch from a &#8220;high&#8221; one, the spec explains it like this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">[W]hen representing sound pitches, 200Hz (or 200hz) is a bass sound, and 6kHz (or 6khz) is a treble sound.<\/p>\n<\/blockquote>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Resolution units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\"><strong>Resolution<\/strong> is how many little dots are packed into a screen \u2014 such as the screen you&#8217;re looking at right now \u2014 where more dots per inch of space improves the clarity and quality of the display. The fewer dots there are, the more pixelated and blurry the display.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Why would you need something like this? Well, it&#8217;s great for targeting styles to specific screens that support certain resolutions in a <a href=\"https:\/\/css-tricks.com\/a-complete-guide-to-css-media-queries\/\">media query<\/a>.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">img {\n  max-width: 500px;\n}\n\n\/* Double the resolution and above *\/\n@media (min-resolution >= 2dppx) {\n  img {\n    max-width: 100%;\n  }\n}<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Unit<\/th><th>Name<\/th><th>Description<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td><code>dpi<\/code><\/td><td>Dots per inch<\/td><td>The number of dots packed into one inch of space.<\/td><td><code>@media<br>(min-resolution: 96dpi) {}<\/code><\/td><\/tr><tr><td><code>dpcm<\/code><\/td><td>Dots per centimeter<\/td><td>The number of dots packed into one centimeter of space.<\/td><td><code>@media<br>(min-resolution: 960dpcm) {}<\/code><\/td><\/tr><tr><td><code>dppx<\/code> (or <code>x<\/code>)<\/td><td>Dots per pixel<\/td><td>The number of dots packed into one pixel of space.<\/td><td><code>@media<br>(min-resolution: 1dppx) {}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Interestingly, the specification makes mention of an <code>infinite<\/code> value that is supported by resolution media queries for targeting screens without resolution constraints. It&#8217;s not so much of a &#8220;catch-all&#8221; value for targeting any sort of screen, but for cases when we&#8217;re using the <a href=\"https:\/\/css-tricks.com\/the-new-css-media-query-range-syntax\/\">media query range syntax<\/a> to evaluate whether a certain value is greater than, less than, or equal to it:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">For output mediums that have no physical constraints on resolution (such as outputting to vector graphics), this feature must match the&nbsp;<dfn>infinite<\/dfn>&nbsp;value. For the purpose of evaluating this media feature in the&nbsp;<a href=\"https:\/\/drafts.csswg.org\/mediaqueries\/#range-context\" rel=\"noopener\">range context<\/a>,&nbsp;<a href=\"https:\/\/drafts.csswg.org\/mediaqueries\/#valdef-media-resolution-infinite\" rel=\"noopener\">infinite<\/a>&nbsp;must be treated as larger than any possible&nbsp;<a href=\"https:\/\/drafts.csswg.org\/css-values-4\/#resolution-value\" rel=\"noopener\">&lt;resolution&gt;<\/a>. (That is, a query like&nbsp;(resolution &gt; 1000dpi)will be true for an&nbsp;infinite&nbsp;media.)<\/p>\n<cite><a href=\"https:\/\/drafts.csswg.org\/mediaqueries\/#valdef-media-resolution-infinite\" rel=\"noopener\">W3C Media Queries Level 4 specification<\/a><\/cite><\/blockquote>\n\n\n<\/details>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"relative-units\" class=\"wp-block-heading\">Relative units<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A&nbsp;<strong>relative unit<\/strong>&nbsp;is extremely well-named because whatever value we use for a relative unit depends on the size of something else. Say we have an HTML element, a&nbsp;<code>&lt;div&gt;<\/code>, and we give it an absolute height value (not a relative one) of&nbsp;<code>200px<\/code>.<\/p>\n\n\n\n<pre rel=\"HTML\" class=\"wp-block-csstricks-code-block language-markup\" data-line=\"\"><code markup=\"tt\">&lt;div class=\"box\">\n  I am 200 pixels tall\n&lt;\/div><\/code><\/pre>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.box {\n  height: 200px;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That height will never change. The&nbsp;<code>.box<\/code>&nbsp;element will be&nbsp;<code>200px<\/code>&nbsp;tall no matter what. But let&#8217;s say we give the element a relative width (not an absolute one) of&nbsp;<code>50%<\/code>.<\/p>\n\n\n\n<pre rel=\"HTML\" class=\"wp-block-csstricks-code-block language-markup\" data-line=\"\"><code markup=\"tt\">&lt;div class=\"box\">\n  I am 200 pixels tall and 50% wide\n&lt;\/div><\/code><\/pre>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.box {\n  height: 200px;\n  width: 50%;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">What happens to our box? It takes up <code>50%<\/code>, or half, of the available space on the screen.<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_yLXvKvz\" src=\"\/\/codepen.io\/anon\/embed\/preview\/yLXvKvz?height=450&amp;theme-id=1&amp;slug-hash=yLXvKvz&amp;default-tab=result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed yLXvKvz\" title=\"CodePen Embed yLXvKvz\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">See that? Go ahead and open that demo in a new window and change the width of the screen. And notice, too, how the height never changes because it&#8217;s an absolute length unit in pixels. The width, meanwhile, is fluidly resized as &#8220;<code>50%<\/code> of the available space&#8221; changes with the width of the screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s what we mean when talking about <strong>computed values<\/strong> with relative numbers. A relative number acts sort of like a multiplier that calculates the value used to set a length based on what type of unit it is relative to. So, a value of <code>3rem<\/code> is going to wind up becoming a different value when it is computed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Percentages, like <code>50%<\/code>, are only one kind of relative unit. We have many, many others. Once again, it&#8217;s helpful to break things out into separate groups to understand the differences just as we did earlier with absolute units.<\/p>\n\n\n\n<details >\n  <summary>\n          Percentages      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\">We&#8217;ve already discussed <strong>percentages<\/strong> in pretty good detail. What makes a percentage relative is that it computes to a number value based on the length of another element. So, an element that is given <code>width: 25%<\/code> in a container that is set to <code>width: 1000px<\/code> computes to <code>width: 250px<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Unit<\/th><th>Name<\/th><th>Relative to&#8230;<\/th><\/tr><\/thead><tbody><tr><td><code>%<\/code><\/td><td>Percent<\/td><td>The size of the element&#8217;s parent container.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Font relative units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\">The <code>em<\/code> and <code>rem<\/code> units we looked at earlier are prime examples of relative units that you will see all over the place. They&#8217;re incredibly handy, as we saw, because changing the <code>font-size<\/code> value of an element&#8217;s parent or the <code>&lt;html&gt;<\/code> element, respectively, causes the element&#8217;s own <code>font-size<\/code> value to update in accordance with the updated value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In other words, we do not need to directly change an element&#8217;s <code>font-size<\/code> when updating the <code>font-size<\/code> of other elements \u2014 it&#8217;s relative and scales with the change.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Name<\/th><th>Relative to&#8230;<\/th><\/tr><\/thead><tbody><tr><td><code>em<\/code><\/td><td>Element<\/td><td>The <code>font-size<\/code> value of the element&#8217;s parent container.<\/td><\/tr><tr><td><code>rem<\/code><\/td><td>Root element<\/td><td>The <code>font-size<\/code> value of the <code>&lt;html&gt;<\/code> element.<\/td><\/tr><tr><td><code>ch<\/code><\/td><td>Character<\/td><td>The width of the <code>0<\/code> character relative to the parent element&#8217;s font. The computed width may update when replacing one font with another, except for <a href=\"https:\/\/coding-fonts.css-trickz.com\" rel=\"noopener\">monospace fonts<\/a> that are consistently sized.<\/td><\/tr><tr><td><code>rch<\/code><\/td><td>Root character<\/td><td>The same thing as a <code>ch<\/code> unit except it is relative to the font of the root element, i.e. <code>&lt;html&gt;<\/code>.<\/td><\/tr><tr><td><code>lh<\/code><\/td><td>Line height<\/td><td>The <code>line-height<\/code> value of the element&#8217;s parent container.<\/td><\/tr><tr><td><code>rlh<\/code><\/td><td>Root element line height<\/td><td>The <code>line-height<\/code> value of the <code>&lt;html&gt;<\/code> element.<\/td><\/tr><tr><td><code>cap<\/code><\/td><td>Capital letter<\/td><td>The height of a capital letter for a particular font relative to the parent element.<\/td><\/tr><tr><td><code>rcap<\/code><\/td><td>Root capital letter<\/td><td>The same measure as <code>cap<\/code> but relative to the root element, i.e. <code>&lt;html&gt;<\/code>.<\/td><\/tr><tr><td><code>ic<\/code><\/td><td>International character<\/td><td>The width of a <a href=\"https:\/\/en.wikipedia.org\/wiki\/CJK_characters\" rel=\"noopener\">CJK character<\/a>, or foreign glyph, e.g. from a <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_CJK_fonts\" rel=\"noopener\">Chinese font<\/a>, relative to an element&#8217;s parent container.<\/td><\/tr><tr><td><code>ric<\/code><\/td><td>Root international character<\/td><td>The same measure as <code>ic<\/code> but relative to the root element, i.e. <code>&lt;html&gt;<\/code>.<\/td><\/tr><tr><td><code>ex<\/code><\/td><td>X-height<\/td><td>The height of the letter <code>x<\/code> of a particular font, or an equivalent for fonts that do not contain an <code>x<\/code> character, relative to the parent element.<\/td><\/tr><tr><td><code>rex<\/code><\/td><td>Root x-height<\/td><td>The same measure as <code>ex<\/code> but relative to the root element, i.e. <code>&lt;html&gt;<\/code>.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Some of those terms will make more sense to typography nerds than others. The following diagram highlights the lines that correspond to relative font units.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1031\" height=\"254\" src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/typography-size-diagram.webp?resize=1031%2C254&#038;ssl=1\" alt=\"Four lines drawn over a line of text illustrating the ascender height, x-height, baseline, and descender height.\" class=\"wp-image-377889\" srcset=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/typography-size-diagram.webp?w=1031&amp;ssl=1 1031w, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/typography-size-diagram.webp?resize=300%2C74&amp;ssl=1 300w, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/typography-size-diagram.webp?resize=1024%2C252&amp;ssl=1 1024w, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/typography-size-diagram.webp?resize=768%2C189&amp;ssl=1 768w\" sizes=\"auto, (min-width: 735px) 864px, 96vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So, at the expense of beating this concept into the ground, if <code>width: 10ch<\/code> computes to a certain number of pixels when using one font, it&#8217;s likely that the computed value will change if the font is swapped out with another one with either larger or smaller characters.<\/p>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Viewport relative units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Unit<\/th><th>Name<\/th><th>Relative to&#8230;<\/th><\/tr><\/thead><tbody><tr><td><code>vh<\/code> \/ <code>vw<\/code><\/td><td>Viewport Height \/ Viewport Width<\/td><td>The height and width of the viewport (i.e., visible part of the screen), respectively.<\/td><\/tr><tr><td><code>vmin<\/code> \/ <code>vmax<\/code><\/td><td>Viewport Minimum \/ Viewport Maximum<\/td><td>The lesser and greater of <code>vh<\/code> and <code>vw<\/code>, respectively.<\/td><\/tr><tr><td><code>lvh<\/code> \/ <code>lvw<\/code><\/td><td>Large Viewport Height \/ Large Viewport Width<\/td><td>The height and width of the viewport when the device&#8217;s virtual keyboard or browser UI is out of view, leaving a larger amount of available space.<\/td><\/tr><tr><td><code>lvb<\/code> \/ <code>lvi<\/code><\/td><td>Large Viewport Block \/ Large Viewport Inline<\/td><td>These are the logical equivalents of <code>lvh<\/code> and <code>lvw<\/code>, indicating the block and inline directions.<\/td><\/tr><tr><td><code>svh<\/code> \/ <code>svw<\/code><\/td><td>Small Viewport Height \/ Small Viewport Width<\/td><td>The height and width of the viewport when the device&#8217;s virtual keyboard or browser UI is in view, making the amount of available space smaller.<\/td><\/tr><tr><td><code>svb<\/code> \/ <code>svi<\/code><\/td><td>Small Viewport Block \/ Small Viewport Inline<\/td><td>These are the logical equivalents of <code>svh<\/code> and <code>svw<\/code>, indicating the block and inline directions.<\/td><\/tr><tr><td><code>dvh<\/code> \/ <code>dvw<\/code><\/td><td>Dynamic Viewport Height \/ Dynamic Viewport Width<\/td><td>The height and width of the viewport accounting for the available space changing if, say, the device&#8217;s virtual keyboard or browser UI is in view.<\/td><\/tr><tr><td><code>dvb<\/code> \/ <code>dvi<\/code><\/td><td>Dynamic Viewport Block \/ Dynamic Viewport Inline<\/td><td>These are the logical equivalents of <code>dvh<\/code> and <code>dvw<\/code>, indicating the block and inline directions.<\/td><\/tr><tr><td><code>dvmin<\/code> \/ <code>dvmax<\/code><\/td><td>Dynamic Viewport Minimum \/ Dynamic Viewport Maximum<\/td><td>The lesser and greater of <code>dvh<\/code>\/<code>dvb<\/code> and <code>dvw<\/code>\/<code>dvi<\/code>, respectively.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Ah, viewport units! When we say that something should be 100% wide, that means it takes up the full width of the contain it is in. That&#8217;s because a percentage unit is always relative to its nearest parent element. But a  &nbsp;<strong>viewport unit<\/strong>&nbsp;is always relative to the size of the viewport, or browser window. If an element has a&nbsp;<strong>viewport height<\/strong> of&nbsp;<code>100vh<\/code>&nbsp;and a&nbsp;<strong>viewport width<\/strong>&nbsp;of&nbsp;<code>100vw<\/code>, then it will be as tall and wide as the full browser window.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1031\" height=\"651\" data-id=\"377892\" src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/viewport-units.webp?resize=1031%2C651&#038;ssl=1\" alt=\"Illustration of a browser window with intersecting arrows pointing towards the vertical and horizontal extremes of the dimensions.\" class=\"wp-image-377892\" srcset=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/viewport-units.webp?w=1031&amp;ssl=1 1031w, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/viewport-units.webp?resize=300%2C189&amp;ssl=1 300w, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/viewport-units.webp?resize=1024%2C647&amp;ssl=1 1024w, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/viewport-units.webp?resize=768%2C485&amp;ssl=1 768w\" sizes=\"auto, (min-width: 735px) 864px, 96vw\" \/><\/figure>\n<\/figure>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_eYRVrEX\" src=\"\/\/codepen.io\/anon\/embed\/preview\/eYRVrEX?height=450&amp;theme-id=1&amp;slug-hash=eYRVrEX&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed eYRVrEX\" title=\"CodePen Embed eYRVrEX\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This can be a neat way to create something like a hero banner at the top of your website. For example, we can make a banner that is&nbsp;always&nbsp;one half (<code>50vh<\/code>) the height of the viewport making it prominent no matter how tall someone&#8217;s browser is. Change the CSS in the top-left corner of the following demo from <code>height: 50vh<\/code> to something else, like <code>75vh<\/code> to see how the banner&#8217;s height responds.<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_yLWeeLb\" src=\"\/\/codepen.io\/anon\/embed\/preview\/yLWeeLb?height=450&amp;theme-id=1&amp;slug-hash=yLWeeLb&amp;default-tab=result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed yLWeeLb\" title=\"CodePen Embed yLWeeLb\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s something else that&#8217;s very important to know when working with viewport units. You know how mobile phones, like iPhone or an Android device, have virtual keyboards where you type directly on the screen? <strong>That keyboard changes the size of the viewport.<\/strong> That means that whenever the keyboard opens, <code>100vh<\/code> is no longer the full height of the screen but <em>whatever space is leftover while the keyboard is open<\/em>, and the layout could get super squished as a result.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s why we have the <code>svh<\/code>, <code>lvh<\/code>, and <code>dvh<\/code> units in addition to <code>vh<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code><strong>svh<\/strong><\/code> is equal to the &#8220;small&#8221; viewport height, which occurs when the keyboard is open.<\/li>\n\n\n\n<li><code><strong>lvh<\/strong><\/code> is equal to the &#8220;large&#8221; viewport height, which is when the keyboard is disabled and out of view.<\/li>\n\n\n\n<li><code><strong>dvh<\/strong><\/code> is a happy medium between <code>svh<\/code> and <code>lvh<\/code> in that it is &#8220;dynamic&#8221; and updates its value accordingly when the keyboard is displayed or not.<\/li>\n\n\n\n<li><strong><code>dvmin<\/code> \/ <code>dvmax<\/code><\/strong> is the greater ore lesser of <code>dvh<\/code>, respectively.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s a bit of a tightrope walk in some cases and a good reason why container queries and their units (which we&#8217;ll get to next) are becoming more popular. Check out Ahmed Shader&#8217;s article <a href=\"https:\/\/ishadeed.com\/article\/new-viewport-units\/\" rel=\"noopener\">&#8220;New Viewport Units&#8221;<\/a> for a comprehensive explanation about viewport units with detailed examples of the issues you may run into. You may also be interested in Sime Vidas&#8217;s <a href=\"https:\/\/www.smashingmagazine.com\/2023\/12\/new-css-viewport-units-not-solve-classic-scrollbar-problem\/\" rel=\"noopener\">&#8220;New CSS Viewport Units Do Not Solve The Classic Scrollbar Problem&#8221;<\/a> for a better understanding of how viewport units compute values.<\/p>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Container relative units      <\/summary>\n  \n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Unit<\/th><th>Name<\/th><th>Equivalent to&#8230;<\/th><\/tr><\/thead><tbody><tr><td><code>cqw<\/code><\/td><td>Container query width<\/td><td>1% of the queried container&#8217;s width<\/td><\/tr><tr><td><code>cqh<\/code><\/td><td>Container query height<\/td><td>1% of the queried container&#8217;s height<\/td><\/tr><tr><td><code>cqi<\/code><\/td><td>Container query inline size<\/td><td>1% of the queried container&#8217;s inline size, which is its width in a horizontal writing mode.<\/td><\/tr><tr><td><code>cqb<\/code><\/td><td>Container query block size<\/td><td>1% of the queried container&#8217;s inline size, which is its height in a horizontal writing mode.<\/td><\/tr><tr><td><code>cqmin<\/code><\/td><td>Container query minimum size<\/td><td>The value of <code>cqi<\/code> or <code>cqb<\/code>, whichever is smaller.<\/td><\/tr><tr><td><code>cqmax<\/code><\/td><td>Container query maximum size<\/td><td>The value of <code>cqi<\/code> or <code>cqb<\/code>, whichever is larger.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Container units are designed to be used with <a href=\"https:\/\/css-tricks.com\/a-cornucopia-of-container-queries\/\">container queries<\/a>. Just as we are able to target a specific screen size with a media query, we can target the specific size of a particular element and apply styles using a container query.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We won&#8217;t do a big ol&#8217; deep dive into container queries here. The relevant bit is that we have CSS length units that are relative to a container&#8217;s size. For example, if we were to define a container:<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.parent-container {\n  container-type: inline-size;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;then we&#8217;re watching that element&#8217;s <code>inline-size<\/code> \u2014 which is equivalent to <code>width<\/code> in a horizontal writing mode \u2014 and can apply styles to other elements when it reaches certain sizes.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.child-element {\n  background: rebeccapurple;\n  width: 100%;\n\n  @container parent (width > 30ch) {\n    .child-element {\n      background: dodgeblue;\n      width: 50cqi;\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Try resizing the following demo. When the parent container is greater than <code>30ch<\/code>, the child element will change backgrounds and shrink to one-half the parent container&#8217;s width, or <code>50cqi<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_yLWYErL\" src=\"\/\/codepen.io\/anon\/embed\/yLWYErL?height=450&amp;theme-id=1&amp;slug-hash=yLWYErL&amp;default-tab=result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed yLWYErL\" title=\"CodePen Embed yLWYErL\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n<\/details>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"what-about-unitless-numbers\" class=\"wp-block-heading\">What about unit-less numbers?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Oh yeah, there are times when you&#8217;re going to see numbers in CSS that don&#8217;t have any unit at all \u2014 just a single integer or number without anything appended to it.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">aspect-ratio: 2 \/ 1; \/* Ratio *\/\ncolumn-count: 3; \/* Specifies a number of columns *\/\nflex-grow: 1; \/* Allows the element to stretch in a flex layout *\/\ngrid-column-start: 4; \/* Places the element on a specific grid line *\/\norder: 2; \/* Sets the order of elemnents in a flex or grid layout *\/\nscale: 2; \/* The elementis scaled up or down by a factor *\/\nz-index: 100; \/* Element is placed in a numbered layer for stacking *\/\nzoom: 0.2;  \/* The element zooms in or out by a factor *\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This isn&#8217;t a comprehensive list of all the CSS properties that accept unit-less numeric values, but it is a solid picture of when you would use them. You&#8217;ll see that in most cases a unit-less number is an explicit detail, such as a specific column to position an element, a specific layer in a stacking context, a boolean that enables or disables a feature, or the order of elements. But note that anytime we declare &#8220;zero&#8221; as a number, we can write it with or without a prepended unit, as zero always evaluates to zero no matter what unit we&#8217;re dealing with.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">border: 0; \/* No border *\/\nbox-shadow: 0 0 5px #333; \/* No shadow offset *\/\nmargin: 0; \/* No margin *\/\npadding: 0; \/* No padding *\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"we-can-create-our-own-custom-units\" class=\"wp-block-heading\">We can create our own custom units!<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In some cases, we may want to work with a numeric value, but CSS doesn&#8217;t exactly recognize it as one. In these cases, the number is recognized as a &#8220;string&#8221; value instead, regardless of whether or not it contains alphabetical characters. That&#8217;s where we can use <code>@property<\/code> to create what&#8217;s called a &#8220;custom property&#8221; that evaluates a numeric value in a certain way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s a good example. There was a time when it was virtually impossible to animate a gradient that changes colors over time because to do so would require (1) a color function that allows us to change a color value&#8217;s hue (which we have with <code>hsl()<\/code>) and (2) being able to interpolate that hue value around the color spectrum, between a range of <code>0deg<\/code> and <code>360deg<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sounds simple enough, right? Define a variable that starts at <code>0<\/code> and then cycles through <code>360<\/code> degrees at the end of an animation. But this doesn&#8217;t work:<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">\/* &#x1f44e; *\/\n.element {\n  --hue: 0;\n  \n  animation: rainbow 10s linear infinite;\n  background: linear-gradient(hsl(--hue 50% 50%);\n}\n\n@keyframes rainbow {\n  from { --hue: 0; }\n  to { --hue: 360deg; }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s because CSS reads the variable as a <em>string<\/em> instead of a <em>number<\/em>. We have to register that variable as a <strong>custom property<\/strong> so that CSS aptly reads it as a numeric value.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">@property --hue {\n  syntax: \"&lt;number>\";\n  initial-value: 0;\n  inherits: true;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There we go! Now that we&#8217;ve given CSS a hint that the <code>--hue<\/code> syntax is that of a <code>&lt;number&gt;<\/code>, we can animate away!<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">\/* &#x1f44d; *\/\n@property --hue {\n  syntax: \"&lt;number>\";\n  initial-value: 0;\n  inherits: true;\n}\n\n.element {\n  --hue: 0;\n  \n  animation: rainbow 10s linear infinite;\n  background: linear-gradient(hsl(--hue 50% 50%);\n}\n\n@keyframes rainbow {\n  from { --huw: 0; }\n  to { --hue: 360deg; }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Find a deeper explanation of this same example in <a href=\"https:\/\/css-tricks.com\/interpolating-numeric-css-variables\/\">&#8220;Interpolating Numeric CSS Variables&#8221;<\/a> by Geoff Graham.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"when-to-use-one-unit-over-another\" class=\"wp-block-heading\">When to use one unit over another<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is super tricky because CSS is extremely flexible and there are no definitive or hard-and-fast rules for when to use a specific type of CSS length unit over another. In some cases, you absolutely have to use a specific unit because that&#8217;s how a certain CSS feature is specced, like using angle units to set the direction of a linear gradient:<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.element {\n  background: linear-gradient(\n    135deg, red, blue;\n  )\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The same goes for the values we use in certain color functions, like using percentages to set the saturation and lightness levels in the <code>hsl()<\/code> function:<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.element {\n  background: hsl(0 100% 10%);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Speaking of color functions, we define alpha transparency with either an integer or number:<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.element {\n  background: hsl(0 100% 10% \/ 0.5); \/* or simply .5 *\/\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">All that being said, many cases are going to be some degree of &#8220;it depends&#8221; but there are some instances where it makes sense to use a specific unit in your work.<\/p>\n\n\n\n<h4 id=\"generally-set-font-sizes-in-rem-and-em-units\" class=\"wp-block-heading\">Generally set font sizes in <code>rem<\/code> and <code>em<\/code> units<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This way, you can set things up in a way where changing the <code>font-size<\/code> value of the <code>&lt;html&gt;<\/code> or a parent element updates the font sizes of their descendants.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">html {\n  font-size: 18px; \/* Inherited by all other elements *\/\n}\n\n.parent {\n  font-size: 1rem; \/* Updates when the `html` size changes *\/\n}\n\n.child {\n  font-size: 1em; \/* Updates when the parent size changes *\/\n}<\/code><\/pre>\n\n\n\n<h4 id=\"declare-zero-without-units-if-youd-like\" class=\"wp-block-heading\">Declare &#8220;zero&#8221; without units if you&#8217;d like<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s not a big deal or anything, but leaving off the units shortens the code a smidge, and anytime we&#8217;re able to write shorter code it&#8217;s an opportunity for faster page performance. The impact may be negligible, but we&#8217;re able to do it since <code>0<\/code> always computes to <code>0<\/code>, no matter what unit we&#8217;re working with.<\/p>\n\n\n\n<h4 id=\"use-container-units-for-responsive-design-where-possible\" class=\"wp-block-heading\">Use container units for responsive design, where possible<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Container queries in general are so gosh-darn great for responsive layouts because they look at the size of the container and let us apply styles to its descendants when the container is a certain size.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.parent {\n  container: my-container \/ inline-size; \/* Looks at width *\/\n}\n\n.child {\n  display: flex;\n  flex-direction: column;\n  max-width: 100vh; \/* 100% of the viewport *\/\n}\n\n\/* When the container is greater than 600px wide *\/\n@container my-container (width >= 600px) {\n  .child {\n    flex-direction: row;\n    max-width: 50%; \/* 50% of the parent elenent *\/\n  }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So, if we going to size the <code>.child<\/code> element \u2014 or any of its children \u2014 it&#8217;s worth specifying sizes in relation to the container&#8217;s size with container units than, say, the viewport&#8217;s size with viewport units.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"8,15\"><code markup=\"tt\">.parent {\n  container: my-container \/ inline-size; \/* Looks at width *\/\n}\n\n.child {\n  display: flex;\n  flex-direction: column;\n  max-width: 100cqi; \/* 100% of the container *\/\n}\n\n\/* When the container is greater than 600px wide *\/\n@container my-container (width >= 600px) {\n  .child {\n    flex-direction: row;\n    max-width: 50cqi; \/* 50% of the container *\/\n  }\n}<\/code><\/pre>\n\n\n\n<h4 id=\"use-percentages-when-youre-unsure-of-the-context\" class=\"wp-block-heading\">Use percentages when you&#8217;re unsure of the context<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, use container units for responsive design, but that only does you good if you know you are in the context of a container. It&#8217;s possible, though, that you use the same component in different places, and one of those places might not be a registered container.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In that case, go with a percentage value because percentages are relative to whatever parent element you&#8217;re in, regardless of whether or not it&#8217;s a container. This way, you can declare an element&#8217;s size as <code>100%<\/code> to take up the full space of whatever parent element contains it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The only word of caution is to note that we&#8217;re only basing the size on the parent. Meanwhile, container units can style any descendant in the container, no matter where it is located.<\/p>\n\n\n\n<h4 id=\"viewport-units-are-great-for-laying-out-containers\" class=\"wp-block-heading\">Viewport units are great for laying out containers<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You may be thinking that viewport units are a bad thing since we&#8217;ve been advising against them in so many cases, like font sizing, but they are still incredibly useful, particularly when it comes to establishing a full-page layout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I say &#8220;full-page&#8221; layout because container queries are the gold standard for sizing elements according to the space they have in their container. But if we&#8217;re working with a full page of containers, this is where viewport units can be used to establish a responsive layout at a higher level.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the elements of individual containers look at their container for sizing information, then the sizing and placement of individual containers themselves probably ought to look at the viewport since it directly influences the amount of space on the page.<\/p>\n\n\n\n<h3 id=\"examples\" class=\"wp-block-heading\">Examples<\/h3>\n\n\n\n<details >\n  <summary>\n          Element (em) and Relative element (rem) units      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\">Let&#8217;s talk specifically about these two little buggers. We saw how a percentage unit calculates its size by the size of something else.&nbsp;<code>em<\/code>&nbsp;and&nbsp;<code>rem<\/code>&nbsp;units are sort of the same, but they are calculated based on the relative font size of specific elements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s start with&nbsp;<code>em<\/code>&nbsp;units and say we have an HTML element, a&nbsp;<code>&lt;div&gt;<\/code>&nbsp;with a&nbsp;<code>.box<\/code>&nbsp;class, and we set its font size to&nbsp;<code>20px<\/code>. That means any text inside of that element is&nbsp;<code>20px<\/code>.<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_bGRLLzb\" src=\"\/\/codepen.io\/anon\/embed\/preview\/bGRLLzb?height=450&amp;theme-id=1&amp;slug-hash=bGRLLzb&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed bGRLLzb\" title=\"CodePen Embed bGRLLzb\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Great, now what if we decide we need additional text in the box, and give it a relative font size of <code>1.5em<\/code>?<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_MWoQVRV\" src=\"\/\/codepen.io\/anon\/embed\/preview\/MWoQVRV?height=450&amp;theme-id=1&amp;slug-hash=MWoQVRV&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed MWoQVRV\" title=\"CodePen Embed MWoQVRV\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">See how a font size of&nbsp;<code>1.5em<\/code>&nbsp;is larger than the&nbsp;<code>20px<\/code>&nbsp;text? That&#8217;s because&nbsp;<strong>the larger text is based on the box&#8217;s font size<\/strong>. Behind the scenes, this is what the browser is calculating:<\/p>\n\n\n\n<pre rel=\"HTML\" class=\"wp-block-csstricks-code-block language-markup\" data-line=\"\"><code markup=\"tt\">20px * 1.5 = 30px<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So, the relative font size is multiplied by the pixel font size, which winds up being&nbsp;<code>30px<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And guess what?&nbsp;<code>rem<\/code>&nbsp;units do the exact same thing. But instead of multiplying itself by the pixel font size of the parent container, it looks at the pixel font size of the actual&nbsp;<code>&lt;html&gt;<\/code>&nbsp;element. By default, that is&nbsp;<code>16px<\/code>.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">\/* This is the browser's default font size *\/\nhtml {\n  font-size: 16px;\n}\n\n.box {\n  font-size: 1.5rem; \/* 16px * 1.5 = 24px *\/\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And if we change the HTML element&#8217;s font size to something else?<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">html {\n  font-size: 18px;\n}\n\n.box {\n  font-size: 1.5rem; \/* 18px * 1.5 = 27px *\/\n}<\/code><\/pre>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Character unit (ch)      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\">The <strong>character unit (<code>ch<\/code>)<\/strong> is another is another unit relative to font size and, while it isn&#8217;t used all that often, it is amazingly great at sizing things based on the amount of content displayed in an element, because <em>one character unit equals the width of one character of content<\/em>. Here&#8217;s how I wrap my own head around it. If we have this in our HTML:<\/p>\n\n\n\n<pre rel=\"HTML\" class=\"wp-block-csstricks-code-block language-markup\" data-line=\"\"><code markup=\"tt\">&lt;p>The big brown dog lazily jumped over the fence.&lt;\/p><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;and this CSS:<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">p {\n  width: 10ch;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">What we get is a paragraph that is 10 characters wide. That means the text will break after the tenth character, including spaces.<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_bGRLMeo\" src=\"\/\/codepen.io\/anon\/embed\/bGRLMeo?height=450&amp;theme-id=1&amp;slug-hash=bGRLMeo&amp;default-tab=result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed bGRLMeo\" title=\"CodePen Embed bGRLMeo\" class=\"cp_embed_iframe\" style=\"width:100%;overflow:hidden\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">But note that the words themselves do not break. If the content is supposed to break after 10 characters, the browser will start the next line after a complete word instead of breaking the word into multiple lines, keeping everything easy to read.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re wondering when you might reach for the <code>ch<\/code> unit, it&#8217;s absolutely boss at <a href=\"https:\/\/css-tricks.com\/line-length-revisited-following-the-research\/\">establishing line lengths that are more pleasant and legible<\/a>, especially for long form content like this guide you&#8217;re reading.<\/p>\n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Line height unit (lh)      <\/summary>\n  \n\n<p class=\"wp-block-paragraph\">The <strong>line-height unit (<code>lh<\/code>)<\/strong> looks at the <code>line-height<\/code> property value of the element&#8217;s containing (i.e., parent) element and uses that value to size things up.<\/p>\n\n\n\n<pre rel=\"CSS\" class=\"wp-block-csstricks-code-block language-css\" data-line=\"\"><code markup=\"tt\">.parent {\n  line-height: 1.5;\n}\n\n.child {\n  height: 3lh; \/* 3 * 1.5 = 4.5 *\/\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When would you use this? Personally, I find <code>lh<\/code> useful for setting an exact height on something based on the number of lines needed for the text. You can see this clearly demonstrated in <a href=\"https:\/\/www.smashingmagazine.com\/2023\/11\/css-responsive-multi-line-ribbon-shapes-part1\/\" rel=\"noopener\">Temani Afif&#8217;s &#8220;CSS Ribbon&#8221; effect<\/a> that uses <code>lh<\/code> to establish dimensions for each row of text that makes for consistently-sized lines that adapt to whatever the parent element&#8217;s <code>font-size<\/code> value happens to be,<\/p>\n\n\n<\/details>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 id=\"related-articles\" class=\"wp-block-heading\">Related Articles<\/h3>\n\n\n\n<details >\n  <summary>\n          Absolute vs. Relative Units      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card articles\" id=\"mini-post-20529\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/units\/\" rel=\"tag\">units<\/a>    <\/div>\n  \n  <time datetime=\"2013-03-13\" title=\"Originally published Mar 13, 2013\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Mar 13, 2013  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/the-lengths-of-css\/\">\n      The Lengths of CSS    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-245258\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/components\/\" rel=\"tag\">components<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/em\/\" rel=\"tag\">em<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/font-size\/\" rel=\"tag\">font-size<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/modules\/\" rel=\"tag\">modules<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/relative-sizing\/\" rel=\"tag\">relative sizing<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/rem\/\" rel=\"tag\">rem<\/a>    <\/div>\n  \n  <time datetime=\"2016-09-09\" title=\"Originally published Sep 9, 2016\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Sep 9, 2016  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/building-resizeable-components-relative-css-units\/\">\n      Building Resizeable Components with Relative CSS Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/shadeed9\/\" aria-label=\"Author page of Ahmad Shadeed\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/1bb7353f7a448c23b80230d323abcc52573289bf456092140cfebe52c78729b5.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/1bb7353f7a448c23b80230d323abcc52573289bf456092140cfebe52c78729b5.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/shadeed9\/\">\n      Ahmad Shadeed    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-312379\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/cascade\/\" rel=\"tag\">cascade<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/computed\/\" rel=\"tag\">computed<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/devtools\/\" rel=\"tag\">DevTools<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/inheritance\/\" rel=\"tag\">inheritance<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/values\/\" rel=\"tag\">values<\/a>    <\/div>\n  \n  <time datetime=\"2020-08-05\" title=\"Originally published Aug 5, 2020\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Aug 5, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/computed-values-more-than-meets-the-eye\/\">\n      Computed Values: More Than Meets the Eye    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/jemimahomodor\/\" aria-label=\"Author page of Jemimah Omodior\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/f4ae6b04e45278681d2f641b2fdd6b49916835ac48a13d4a4da1c9cc8eaaf692.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/f4ae6b04e45278681d2f641b2fdd6b49916835ac48a13d4a4da1c9cc8eaaf692.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/jemimahomodor\/\">\n      Jemimah Omodior    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-330498\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/relative-sizing\/\" rel=\"tag\">relative sizing<\/a>    <\/div>\n  \n  <time datetime=\"2020-12-10\" title=\"Originally published Dec 10, 2020\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Dec 10, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/its-all-relative\/\">\n      It&#8217;s all relative.    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/geoffgraham\/\" aria-label=\"Author page of Geoff Graham\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a8e040142716a4b44d014d80fbcf99c635b1d8faabfe469b6954a8ef2f168595.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a8e040142716a4b44d014d80fbcf99c635b1d8faabfe469b6954a8ef2f168595.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/geoffgraham\/\">\n      Geoff Graham    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Container Units      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card articles\" id=\"mini-post-375728\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/container-queries\/\" rel=\"tag\">container-queries<\/a>    <\/div>\n  \n  <time datetime=\"2022-12-13\" title=\"Originally published Dec 13, 2022\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Dec 13, 2022  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/a-few-times-container-size-queries-would-have-helped-me-out\/\">\n      A Few Times Container Size Queries Would Have Helped Me Out    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/danchristofi\/\" aria-label=\"Author page of Dan Christofi\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/1106690147ccbc29138db031a652fd24b624b4867852991509d062234c5992dd.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/1106690147ccbc29138db031a652fd24b624b4867852991509d062234c5992dd.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/danchristofi\/\">\n      Dan Christofi    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-352210\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/container-units\/\" rel=\"tag\">container units<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/container-queries\/\" rel=\"tag\">container-queries<\/a>    <\/div>\n  \n  <time datetime=\"2021-09-22\" title=\"Originally published Sep 22, 2021\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Sep 22, 2021  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/container-units-should-be-pretty-handy\/\">\n      Container Units Should Be Pretty Handy    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-340967\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/container-queries\/\" rel=\"tag\">container-queries<\/a>    <\/div>\n  \n  <time datetime=\"2021-06-09\" title=\"Originally published Jun 9, 2021\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Jun 9, 2021  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/a-cornucopia-of-container-queries\/\">\n      A Cornucopia of Container Queries    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/geoffgraham\/\" aria-label=\"Author page of Geoff Graham\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a8e040142716a4b44d014d80fbcf99c635b1d8faabfe469b6954a8ef2f168595.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a8e040142716a4b44d014d80fbcf99c635b1d8faabfe469b6954a8ef2f168595.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/geoffgraham\/\">\n      Geoff Graham    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-16872\">\n\n  \n  <time datetime=\"2012-04-29\" title=\"Originally published Apr 29, 2012\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Apr 29, 2012  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/conditional-content-via-css-media-queries\/\">\n      Conditional Content via CSS Media Queries    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Viewport Units      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card articles\" id=\"mini-post-260090\">\n\n  \n  <time datetime=\"2017-09-16\" title=\"Originally published Sep 16, 2017\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Sep 16, 2017  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/the-notch-and-css\/\">\n      &#8220;The Notch&#8221; and CSS    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-305453\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/viewport-units\/\" rel=\"tag\">viewport units<\/a>    <\/div>\n  \n  <time datetime=\"2020-03-25\" title=\"Originally published Mar 25, 2020\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Mar 25, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/css-viewport-units\/\">\n      CSS Viewport Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-311173\">\n\n  \n  <time datetime=\"2020-05-15\" title=\"Originally published May 15, 2020\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    May 15, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/css-fix-for-100vh-in-mobile-webkit\/\">\n      CSS fix for 100vh in mobile WebKit    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-252583\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/viewport-units\/\" rel=\"tag\">viewport units<\/a>    <\/div>\n  \n  <time datetime=\"2017-06-05\" title=\"Originally published Jun 5, 2017\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Jun 5, 2017  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/fun-viewport-units\/\">\n      Fun with Viewport Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/miriam\/\" aria-label=\"Author page of Miriam Suzanne\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/ae0467bce26cf281ae92243a6000639eb4efaed23b953798bf4bdf7cdb1f3778.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/ae0467bce26cf281ae92243a6000639eb4efaed23b953798bf4bdf7cdb1f3778.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/miriam\/\">\n      Miriam Suzanne    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-346316\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/viewport-units\/\" rel=\"tag\">viewport units<\/a>    <\/div>\n  \n  <time datetime=\"2021-08-09\" title=\"Originally published Aug 9, 2021\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Aug 9, 2021  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/the-large-small-and-dynamic-viewports\/\">\n      The Large, Small, and Dynamic Viewports    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-203270\">\n\n  \n  <time datetime=\"2015-06-05\" title=\"Originally published Jun 5, 2015\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Jun 5, 2015  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/viewport-vs-percentage-units\/\">\n      Viewport vs Percentage Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-16888\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/fluid-type\/\" rel=\"tag\">fluid type<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/typography\/\" rel=\"tag\">typography<\/a>    <\/div>\n  \n  <time datetime=\"2012-04-30\" title=\"Originally published Apr 30, 2012\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Apr 30, 2012  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/viewport-sized-typography\/\">\n      Viewport Sized Typography    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-297902\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/viewport-units\/\" rel=\"tag\">viewport units<\/a>    <\/div>\n  \n  <time datetime=\"2019-11-06\" title=\"Originally published Nov 6, 2019\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Nov 6, 2019  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/some-things-you-oughta-know-when-working-with-viewport-units\/\">\n      Some Things You Oughta Know When Working with Viewport Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-204106\">\n\n  \n  <time datetime=\"2015-06-23\" title=\"Originally published Jun 23, 2015\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Jun 23, 2015  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/viewport-sized-typography-with-minimum-and-maximum-sizes\/\">\n      Viewport sized typography with minimum and maximum sizes    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-264858\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/fluid-type\/\" rel=\"tag\">fluid type<\/a>    <\/div>\n  \n  <time datetime=\"2018-01-05\" title=\"Originally published Jan 5, 2018\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Jan 5, 2018  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/font-size-viewport-units\/\">\n      `font-size` With All Viewport Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-343139\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/fluid-type\/\" rel=\"tag\">fluid type<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/typography\/\" rel=\"tag\">typography<\/a>    <\/div>\n  \n  <time datetime=\"2021-06-28\" title=\"Originally published Jun 28, 2021\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Jun 28, 2021  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/working-around-the-viewport-based-fluid-typography-bug-in-safari\/\">\n      Working around the viewport-based fluid typography bug in Safari    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Typography      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card articles\" id=\"mini-post-306222\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/accessibility\/\" rel=\"tag\">accessibility<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/font-size\/\" rel=\"tag\">font-size<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/user-agent-stylesheets\/\" rel=\"tag\">user agent stylesheets<\/a>    <\/div>\n  \n  <time datetime=\"2020-04-23\" title=\"Originally published Apr 23, 2020\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Apr 23, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/accessible-font-sizing-explained\/\">\n      Accessible Font Sizing, Explained    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/agalante\/\" aria-label=\"Author page of Andr\u00e9s Galante\">\n      <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"avatar avatar-80 photo avatar-default\" height=\"80\" src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2017\/04\/Ando1.jpg?resize=80%2C80&#038;ssl=1\" width=\"80\">    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/agalante\/\">\n      Andr\u00e9s Galante    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-299523\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/fluid-type\/\" rel=\"tag\">fluid type<\/a>    <\/div>\n  \n  <time datetime=\"2019-11-29\" title=\"Originally published Nov 29, 2019\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Nov 29, 2019  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/simplified-fluid-typography\/\">\n      Simplified Fluid Typography    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-20734\">\n\n  \n  <time datetime=\"2013-03-22\" title=\"Originally published Mar 22, 2013\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Mar 22, 2013  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/theres-more-to-the-css-rem-unit-than-font-sizing\/\">\n      There\u2019s more to the CSS rem unit than font sizing    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/romanrudenko\/\" aria-label=\"Author page of Roman Rudenko\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/d9b78ef2ba57de7ceeceddfc94613bb8d6da9d2e61acfeffe2c330226eb51107.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/d9b78ef2ba57de7ceeceddfc94613bb8d6da9d2e61acfeffe2c330226eb51107.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/romanrudenko\/\">\n      Roman Rudenko    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-167135\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/web-fonts\/\" rel=\"tag\">web fonts<\/a>    <\/div>\n  \n  <time datetime=\"2014-04-08\" title=\"Originally published Apr 8, 2014\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Apr 8, 2014  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/rems-ems\/\">\n      Font Size Idea: px at the Root, rem for Components, em for Text Elements    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-308061\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/units\/\" rel=\"tag\">units<\/a>    <\/div>\n  \n  <time datetime=\"2020-05-05\" title=\"Originally published May 5, 2020\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    May 5, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/lh-and-rlh-units\/\">\n      `lh` and `rlh` units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-16888\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/fluid-type\/\" rel=\"tag\">fluid type<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/typography\/\" rel=\"tag\">typography<\/a>    <\/div>\n  \n  <time datetime=\"2012-04-30\" title=\"Originally published Apr 30, 2012\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Apr 30, 2012  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/viewport-sized-typography\/\">\n      Viewport Sized Typography    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-264858\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/fluid-type\/\" rel=\"tag\">fluid type<\/a>    <\/div>\n  \n  <time datetime=\"2018-01-05\" title=\"Originally published Jan 5, 2018\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Jan 5, 2018  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/font-size-viewport-units\/\">\n      `font-size` With All Viewport Units    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-204106\">\n\n  \n  <time datetime=\"2015-06-23\" title=\"Originally published Jun 23, 2015\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Jun 23, 2015  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/viewport-sized-typography-with-minimum-and-maximum-sizes\/\">\n      Viewport sized typography with minimum and maximum sizes    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Angle Units      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card links\" id=\"mini-post-282291\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/units\/\" rel=\"tag\">units<\/a>    <\/div>\n  \n  <time datetime=\"2019-02-06\" title=\"Originally published Feb 6, 2019\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Feb 6, 2019  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/gradians-and-turns-the-quiet-heroes-of-css-angles\/\">\n      Gradians and Turns: the quiet heroes of CSS angles    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/geoffgraham\/\" aria-label=\"Author page of Geoff Graham\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a8e040142716a4b44d014d80fbcf99c635b1d8faabfe469b6954a8ef2f168595.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a8e040142716a4b44d014d80fbcf99c635b1d8faabfe469b6954a8ef2f168595.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/geoffgraham\/\">\n      Geoff Graham    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-201390\">\n\n  \n  <time datetime=\"2015-05-05\" title=\"Originally published May 5, 2015\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    May 5, 2015  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/transforms-on-svg-elements\/\">\n      Transforms on SVG Elements    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/thebabydino\/\" aria-label=\"Author page of Ana Tudor\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/3a2e2f1da40ff7880e4ab0efbf2082f5deffc43b8e7a5f2ed42f4c386a8fd932.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/3a2e2f1da40ff7880e4ab0efbf2082f5deffc43b8e7a5f2ed42f4c386a8fd932.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/thebabydino\/\">\n      Ana Tudor    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-335589\">\n\n  \n  <time datetime=\"2021-03-02\" title=\"Originally published Mar 2, 2021\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Mar 2, 2021  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/how-to-animate-the-details-element\/\">\n      How to Animate the Details Element    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-320113\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/checkbox-hack\/\" rel=\"tag\">checkbox hack<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/menu\/\" rel=\"tag\">menu<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/navigation\/\" rel=\"tag\">navigation<\/a>    <\/div>\n  \n  <time datetime=\"2020-09-08\" title=\"Originally published Sep 8, 2020\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Sep 8, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/menu-reveal-by-page-rotate-animation\/\">\n      Menu Reveal By Page Rotate Animation    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/preethi\/\" aria-label=\"Author page of Preethi\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/c9b682679cc38f0781d644b24d6fa5b2c43447f34bf4ba130aa16bb99456b7fc.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/c9b682679cc38f0781d644b24d6fa5b2c43447f34bf4ba130aa16bb99456b7fc.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/preethi\/\">\n      Preethi    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-311036\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/tables\/\" rel=\"tag\">tables<\/a>    <\/div>\n  \n  <time datetime=\"2020-06-01\" title=\"Originally published Jun 1, 2020\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Jun 1, 2020  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/rotated-table-column-headers-now-with-fewer-magic-numbers\/\">\n      Rotated Table Column Headers\u2026 Now With Fewer Magic Numbers!    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/cappiepomeroy\/\" aria-label=\"Author page of Cappie Pomeroy\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/bb5f7941024fd947b8e497a095b80902da4f7bd57a1607d536eddb317aeaad07.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/bb5f7941024fd947b8e497a095b80902da4f7bd57a1607d536eddb317aeaad07.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/cappiepomeroy\/\">\n      Cappie Pomeroy    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-7765\">\n\n  \n  <time datetime=\"2010-10-30\" title=\"Originally published Oct 30, 2010\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Oct 30, 2010  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/rotating-molecules-with-3d-transforms\/\">\n      Rotating Molecules with 3D Transforms    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-254602\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/3d\/\" rel=\"tag\">3d<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/css-variables\/\" rel=\"tag\">css variables<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/custom-properties\/\" rel=\"tag\">custom properties<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/javascript\/\" rel=\"tag\">JavaScript<\/a>    <\/div>\n  \n  <time datetime=\"2017-05-16\" title=\"Originally published May 16, 2017\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    May 16, 2017  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/simplifying-css-cubes-custom-properties\/\">\n      Simplifying CSS Cubes with Custom Properties    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/thebabydino\/\" aria-label=\"Author page of Ana Tudor\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/3a2e2f1da40ff7880e4ab0efbf2082f5deffc43b8e7a5f2ed42f4c386a8fd932.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/3a2e2f1da40ff7880e4ab0efbf2082f5deffc43b8e7a5f2ed42f4c386a8fd932.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/thebabydino\/\">\n      Ana Tudor    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Time Units      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card articles\" id=\"mini-post-160517\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/animation\/\" rel=\"tag\">animation<\/a>    <\/div>\n  \n  <time datetime=\"2014-01-16\" title=\"Originally published Jan 16, 2014\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Jan 16, 2014  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/css-animation-tricks\/\">\n      CSS Animation Tricks: State Jumping, Negative Delays, Animating Origin, and More    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/zachsaucier\/\" aria-label=\"Author page of Zach Saucier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/89c90bb394da979b9fd9f03d3cadfdb47b9f0bb8ecf96f71e7eb86dcfc35df92.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/89c90bb394da979b9fd9f03d3cadfdb47b9f0bb8ecf96f71e7eb86dcfc35df92.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/zachsaucier\/\">\n      Zach Saucier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-264678\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/css-animation\/\" rel=\"tag\">css animation<\/a>    <\/div>\n  \n  <time datetime=\"2018-01-09\" title=\"Originally published Jan 9, 2018\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Jan 9, 2018  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/making-css-animations-feel-natural\/\">\n      Making CSS Animations Feel More Natural    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/brandongregory\/\" aria-label=\"Author page of Brandon Gregory\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/75145bb7fb4bb2376cb70d8eb84ad16a16311a674ee2378c7d99f3d67108a995.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/75145bb7fb4bb2376cb70d8eb84ad16a16311a674ee2378c7d99f3d67108a995.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/brandongregory\/\">\n      Brandon Gregory    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card links\" id=\"mini-post-8120\">\n\n  \n  <time datetime=\"2010-12-09\" title=\"Originally published Dec 9, 2010\">\n    <strong>\n                \n        Link\n      <\/strong>\n\n    on\n\n    Dec 9, 2010  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/css-transition-timing\/\">\n      CSS Transition Timing    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-294214\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/hover\/\" rel=\"tag\">hover<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/nth-child\/\" rel=\"tag\">nth-child<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/sass\/\" rel=\"tag\">Sass<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/transition-delay\/\" rel=\"tag\">transition-delay<\/a>    <\/div>\n  \n  <time datetime=\"2019-08-14\" title=\"Originally published Aug 14, 2019\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Aug 14, 2019  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/staggered-css-transitions\/\">\n      Staggered CSS Transitions    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-372850\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/css-animation\/\" rel=\"tag\">css animation<\/a>    <\/div>\n  \n  <time datetime=\"2022-09-06\" title=\"Originally published Sep 6, 2022\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Sep 6, 2022  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/hacking-css-animation-state-and-playback-time\/\">\n      Hacking CSS Animation State and Playback Time    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/coolwanglu\/\" aria-label=\"Author page of Lu Wang\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a7803434f7dfeb1e455c0363a1a655269cd8b23a5fac03e7d0aba38372378a28.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/a7803434f7dfeb1e455c0363a1a655269cd8b23a5fac03e7d0aba38372378a28.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/coolwanglu\/\">\n      Lu Wang    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-205895\">\n\n  \n  <time datetime=\"2015-08-03\" title=\"Originally published Aug 3, 2015\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Aug 3, 2015  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/debugging-css-keyframe-animations\/\">\n      Debugging CSS Keyframe Animations    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/sdrasner\/\" aria-label=\"Author page of Sarah Drasner\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/49e5183e81a9feacc62fd1d1c7e0501650020fc42379813c4744b2fad84a0da2.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/49e5183e81a9feacc62fd1d1c7e0501650020fc42379813c4744b2fad84a0da2.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/sdrasner\/\">\n      Sarah Drasner    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-373184\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/conic-gradients\/\" rel=\"tag\">conic gradients<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/custom-properties\/\" rel=\"tag\">custom properties<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/dates\/\" rel=\"tag\">dates<\/a> <a href=\"https:\/\/css-tricks.com\/tag\/gradients\/\" rel=\"tag\">gradients<\/a>    <\/div>\n  \n  <time datetime=\"2022-09-19\" title=\"Originally published Sep 19, 2022\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Sep 19, 2022  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/making-a-real-time-clock-with-a-conic-gradient-face\/\">\n      Making a Real-Time Clock With a Conic Gradient Face    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/brechtderuyte\/\" aria-label=\"Author page of Brecht De Ruyte\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/8322762f5ea3aaadd09f47aba3386e4f5eef9cb63c1f7feb4239bd257d94b9c0.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/8322762f5ea3aaadd09f47aba3386e4f5eef9cb63c1f7feb4239bd257d94b9c0.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/brechtderuyte\/\">\n      Brecht De Ruyte    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<details >\n  <summary>\n          Resolution Units      <\/summary>\n  \n\n    \t\t\n    <div class=\"in-article-cards\">\n      <article class=\"in-article-card articles\" id=\"mini-post-1259\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/svg\/\" rel=\"tag\">SVG<\/a>    <\/div>\n  \n  <time datetime=\"2008-11-03\" title=\"Originally published Nov 3, 2008\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Nov 3, 2008  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/high-dpi-monitors-resolution-independance-the-web-and-you\/\">\n      High DPI Monitors, Resolution Independance, The Web, and You    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-241350\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/rwd\/\" rel=\"tag\">rwd<\/a>    <\/div>\n  \n  <time datetime=\"2016-05-09\" title=\"Originally published May 9, 2016\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    May 9, 2016  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/optimizing-large-scale-displays\/\">\n      Optimizing for Large-Scale Displays    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/jmy1138\/\" aria-label=\"Author page of Jon Yablonski\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/d643f755d758b15a447eb75687823b6fe9597ad551ab72a0bcb58108b849e4dc.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/d643f755d758b15a447eb75687823b6fe9597ad551ab72a0bcb58108b849e4dc.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/jmy1138\/\">\n      Jon Yablonski    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card \" id=\"mini-post-17757\">\n\n  \n  <time datetime=\"2012-08-15\" title=\"Originally published Aug 15, 2012\">\n    <strong>\n                \n      Snippet\n      <\/strong>\n\n    on\n\n    Aug 15, 2012  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/snippets\/css\/retina-display-media-query\/\">\n      Retina Display Media Query    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n<article class=\"in-article-card articles\" id=\"mini-post-343182\">\n\n      <div class=\"tags\">\n      <a href=\"https:\/\/css-tricks.com\/tag\/debugging\/\" rel=\"tag\">debugging<\/a>    <\/div>\n  \n  <time datetime=\"2021-06-30\" title=\"Originally published Jun 30, 2021\">\n    <strong>\n                \n        Article\n      <\/strong>\n\n    on\n\n    Jun 30, 2021  <\/time>\n\n  <h3>\n    <a href=\"https:\/\/css-tricks.com\/fixing-a-bug-in-low-resolution-mode\/\">\n      Fixing a Bug in Low-Resolution Mode    <\/a>\n  <\/h3>\n\n  \n  <div class=\"author-row\">\n    <a href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\" aria-label=\"Author page of Chris Coyier\">\n      <img data-recalc-dims=\"1\" alt='' src=\"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg?resize=80%2C80&#038;ssl=1\" srcset='https:\/\/css-tricks.com\/wp-content\/cache\/breeze-extra\/gravatars\/41a6f9778d12dfedcc7ec3727d64a12491d75d9a65d4b9323feb075391ae6795.jpg 2x' class='avatar avatar-80 photo' height=\"80\" width=\"80\" \/>    <\/a>\n  \n    <a class=\"author-name\" href=\"https:\/\/css-tricks.com\/author\/chriscoyier\/\">\n      Chris Coyier    <\/a>\n  <\/div>\n\n<\/article>\n    <\/div>\n  \n\n\n<\/details>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A comprehensive guide covering nine types of lengths that CSS uses to size elements in terms of dimensions, space, time, and even sound.<\/p>\n","protected":false},"author":2508,"featured_media":378323,"comment_status":"open","ping_status":"closed","sticky":false,"template":"guide-special.php","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":false,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18847],"tags":[18987,1586],"class_list":["post-375815","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-container-units","tag-units"],"acf":{"show_toc":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2024\/05\/css-units.webp?fit=1200%2C600&ssl=1","jetpack-related-posts":[{"id":366993,"url":"https:\/\/css-tricks.com\/how-stroke-dasharray-patterns-work\/","url_meta":{"origin":375815,"position":0},"title":"How stroke-dasharray Patterns Work","author":"Geoff Graham","date":"July 15, 2022","format":false,"excerpt":"Say you have a line in SVG: <svg> <line x1=\"0\" y1=\"30\" x2=\"500\" y2=\"30\" stroke-color=\"#f8a100\" \/> <\/svg> You can use the\u00a0stroke-dasharray\u00a0property in CSS to make dashes: line { stroke-dasharray: 5; } That\u00a05\u00a0value is a relative unit based on the size of the SVG's\u00a0viewBox. We could use any CSS length, really. But\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":303923,"url":"https:\/\/css-tricks.com\/a-complete-guide-to-calc-in-css\/","url_meta":{"origin":375815,"position":1},"title":"The CSS Calculating Function  Guide","author":"Chris Coyier","date":"March 17, 2020","format":false,"excerpt":"CSS has a special calc() function for doing basic math. In this guide, let's cover just about everything there is to know about this very useful function. Here's an example: .main-content { \/* Subtract 80px from 100vh *\/ height: calc(100vh - 80px); } In this guide, let's cover just about\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/calc-guide.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/calc-guide.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/calc-guide.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/calc-guide.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/calc-guide.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":308061,"url":"https:\/\/css-tricks.com\/lh-and-rlh-units\/","url_meta":{"origin":375815,"position":2},"title":"`lh` and `rlh` units","author":"Chris Coyier","date":"May 5, 2020","format":false,"excerpt":"There's some new units I was totally unaware of from the Level 4 spec for CSS values! The lh unit is \"equal to the computed value of line-height\" and rlh is the same only of the root element (probably the <html> element) rather than the current element. Why would that\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/05\/css-lh-unit.png?fit=1152%2C528&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/05\/css-lh-unit.png?fit=1152%2C528&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/05\/css-lh-unit.png?fit=1152%2C528&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/05\/css-lh-unit.png?fit=1152%2C528&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/05\/css-lh-unit.png?fit=1152%2C528&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":337636,"url":"https:\/\/css-tricks.com\/platform-news-rounded-outlines-gpu-accelerated-svg-animations-how-css-variables-are-resolved\/","url_meta":{"origin":375815,"position":3},"title":"Platform News: Rounded Outlines, GPU-Accelerated SVG Animations, How CSS Variables Are Resolved","author":"\u0160ime Vidas","date":"April 2, 2021","format":false,"excerpt":"In the news this week, Firefox gets rounded outlines, SVG animations are now GPU-accelerated in Chrome, there are no physical units in CSS, The New York Times crossword is accessible, and CSS variables are resolved before the value is inherited. Let's jump in the news! Rounded outlines are coming to\u2026","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/04\/wpn-20210402.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/04\/wpn-20210402.jpg?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/04\/wpn-20210402.jpg?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/04\/wpn-20210402.jpg?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/04\/wpn-20210402.jpg?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":389371,"url":"https:\/\/css-tricks.com\/css-typed-arithmetic\/","url_meta":{"origin":375815,"position":4},"title":"CSS Typed Arithmetic","author":"Amit Sheen","date":"September 24, 2025","format":false,"excerpt":"Starting in Chrome 140, we'll be able to calculate numeric values with mixed data types. Sounds small, but Amit demonstrates how big a deal this is, calling it Computational CSS.","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2025\/09\/css-types-arithmetic.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2025\/09\/css-types-arithmetic.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2025\/09\/css-types-arithmetic.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2025\/09\/css-types-arithmetic.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2025\/09\/css-types-arithmetic.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":389944,"url":"https:\/\/css-tricks.com\/on-inheriting-and-sharing-property-values\/","url_meta":{"origin":375815,"position":5},"title":"On Inheriting and Sharing Property Values","author":"Daniel Schwarz","date":"November 24, 2025","format":false,"excerpt":"There are many ways to share properties, but what would it look like to inherit and use any parent property value on a child?","rel":"","context":"In &quot;Articles&quot;","block_context":{"text":"Articles","link":"https:\/\/css-tricks.com\/category\/articles\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2019\/12\/dashy-circles.png?fit=1200%2C600&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/375815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/2508"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=375815"}],"version-history":[{"count":11,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/375815\/revisions"}],"predecessor-version":[{"id":387242,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/375815\/revisions\/387242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media\/378323"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=375815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=375815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=375815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}