CSS: Media query
A short, tested CSS example for media query. Copy it and adjust the names and paths for your project.
CSS
@media (max-width: 640px) {
.sidebar { display: none; }
}
@media (prefers-color-scheme: dark) {
:root { --bg: #111; --text: #eee; }
}
@media (prefers-reduced-motion: reduce) {
* { animation: none !important; }
}Find it in Zest
Search for “css media query” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.