With a slew of new features on the horizon, 2022 is shaping up to be an excellent year for CSS. Some are currently in browsers, while others are expected to acquire general browser support in 2022, with one or two taking a bit later. We’ll look at some of them.
- Container Queries
CSS Color Functions Have Been Updated:
hwb(): Hue, Whiteness, Blackness.
lab(): Lightness, along with a and b values, determine the hue.
lch(): Lightness, Chroma, Hue.
color-mix(): Mix two colors together.
color-contrast(): From a list of colors, output the one with the highest contrast compared to the first argument.
color(): Specify color in a different color space (e.g.