Comments on: What CSS Do You Absolutely Have to Know in 2022? https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Fri, 09 Dec 2022 09:03:07 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Red Feet https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/#comment-1797981 Fri, 09 Dec 2022 09:03:07 +0000 https://css-tricks.com/?p=374775#comment-1797981 clamp(min, calc(some..magic..formula), max)
js in css instead of css in js:

How? css-vars dynamically changed by javascript:
document.documentElement.style.setProperty('--var-name', value);

flex-props: align-items, justify-content, gap (as Rob already mentioned) modified by media queries
hsl() and hsla(), but I am really eager to start replacing them with the new color-formats, optimized for the human eye like: hwb(), lab() and lch() (and maybe HSLuv ??)
Always and forever on the list: box-sizing: border-box

]]>
By: kartofelek007 https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/#comment-1797710 Sat, 12 Nov 2022 15:12:02 +0000 https://css-tricks.com/?p=374775#comment-1797710 logic properties:
https://web.dev/learn/css/logical-properties/

]]>
By: Claudio https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/#comment-1797692 Wed, 09 Nov 2022 08:09:07 +0000 https://css-tricks.com/?p=374775#comment-1797692 I think pointer-events, user-select and cursor are important

also the moment you start working on a big project you should start understanding performance focused instructions (contain, content-visibility and will-change)

]]>
By: Vincas Stonys https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/#comment-1797691 Tue, 08 Nov 2022 19:47:47 +0000 https://css-tricks.com/?p=374775#comment-1797691 Great list, Geoff! And thanks for the mention.

]]>
By: Chris LaChance https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/#comment-1797689 Tue, 08 Nov 2022 18:14:29 +0000 https://css-tricks.com/?p=374775#comment-1797689 CSS custom properties (variables) are up there for me.

]]>
By: Rob https://css-tricks.com/what-css-do-you-absolutely-have-to-know-in-2022/#comment-1797685 Tue, 08 Nov 2022 16:36:39 +0000 https://css-tricks.com/?p=374775#comment-1797685 Alongside display I would throw in:

align-items
justify-content
gap

Those in combination with display:flex can help align items in a predictable grid with spacing without needing to rely on any complicated margins, wrappers that use negative padding, etc.

]]>