Skip to content

Instantly share code, notes, and snippets.

@NazCodeland
Last active February 11, 2025 14:16
Show Gist options
  • Save NazCodeland/e6573fb1233f609396b7776525bc0f16 to your computer and use it in GitHub Desktop.
Save NazCodeland/e6573fb1233f609396b7776525bc0f16 to your computer and use it in GitHub Desktop.
css units
{
"absolute": ["px", "deg", "in", "cm", "mm", "pt", "pc", "ex"],
"relative": ["rem", "em", "%", "ch"],
"viewport": {
"inline": ["vi", "dvi", "svi", "lvi", "vw", "dvw", "svw", "lvw"],
"block": ["vb", "dvb", "svb", "lvb", "vh", "dvh", "svh", "lvh"],
"size": ["vmin", "dvmin", "svmin", "lvmin", "vmax", "dvmax", "svmax", "lvmax"]
},
"container": ["cqi", "cqw", "cqb","cqh", "cqmin", "cqmax"]
}
/*
Absolute units: px, deg, in, cm, mm, pt, pc, ex
Relative units: rem, em, %, ch
Viewport units: vi, dvi, svi, lvi, vw, dvw, svw, lvw, vb, dvb, svb, lvb, vh, dvh, svh, lvh, vmin, dvmin, svmin, lvmin, vmax, dvmax, svmax, lvmax
Container query units: cqi, cqb, cqw, cqh, cqmax, cqmin
https://web.dev/blog/state-of-css-2022#viewport_units
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment