Media Queries
Apply styles based on viewport size, orientation, colour scheme or input type.
Easy
@media (min-width: 48rem) { .sidebar { display: block; } }
@media (prefers-color-scheme: dark) { :root { --bg: #111; } }
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.