A Few Ways CSS Is Easier To Write In 2023
BRANK
We’re living in somewhat of a CSS renaissance with new features, techniques, experiments, and ideas coming at us to an extent we haven’t seen since “CSS3”. It’s easy to feel overwhelmed when your profession seems to be advancing at breakneck speed, but Geoff Graham considers the ways “modern” CSS in 2023 has actually made CSS “easier” to write.
1 comments
:is()
や:has()
を使った意図を伝えやすいセレクタ、margin-inline: auto;
を使ったよりシンプルな中央寄せ、[dir="rtl"]
の代わりにmargin-inline-start
を使った行頭スペーシング、CSS Custom Properties とcolor-mix()
関数を使ったカラーパレットの管理、新しい単位ch
と見出しにtext-wrap: balance;
を用いた行あたりの文字数管理など