Cómo escribir CSS en el año 2023

En Writing CSS In 2023: Is It Any Different Than A Few Years Ago? se explica cómo se debe escribir CSS en la actualidad y así evitar escribir CSS viejuno:

CSS is evolving faster than ever. With all of the new features that are now available — and forthcoming — since we got Flexbox and Grid years ago, the way we write CSS is evolving, too. In this article, Geoff Graham shares which features have had the most influence on his current approaches to CSS, as well as those that have not (at least yet).

Guía de diseño adaptativo moderno

En The Guide To Responsive Design In 2023 and Beyond se explica todo esto:

Using Modern CSS

  • The typography is responsive to the viewport width via clamp() function.
  • The spacing is responsive to the viewport width via clamp() function.
  • The hero section is responsive to its content via flexbox wrapping.
  • The cards grid is responsive to the available space with minmax(), no media queries.
  • The card component is responsive to its wrapper via size container queries and style container queries.
  • The margins and paddings are responsive to the websites language via logical properties.

Using Media Queries

  • The site navigation is responsive to the viewport width.
  • The theming is responsive to the user preferences in their operating system.
  • The card hover effect is responsive to what the user is using (touch vs mouse).