Media Queries

@media covers @media syntax and Media Queries in HTML the features. Beyond width, these widely available features adapt to how a person uses the device:

Range, input and preference queries in practiceCSS
@media (40rem <= width < 64rem) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (hover: hover) and (pointer: fine) {          /* mouse or trackpad as the main input */
  .card .actions { opacity: 0; }
  .card:hover .actions, .card:focus-within .actions { opacity: 1; }
}
@media (pointer: coarse) { .toolbar button { min-block-size: 44px; } }   /* fingers */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .badge { border: 1px solid CanvasText; } }