Drop heavy backgrounds
@media (prefers-reduced-data: reduce) {
.hero {
background-image: none;
background-color: #0f172a;
}
}
The prefers-reduced-data media feature detects a request for lighter network usage. Skip large background images and heavy decorative assets when it matches.
@media (prefers-reduced-data: reduce) {
.hero { background-image: none; }
}@media (prefers-reduced-data: reduce) {
.hero {
background-image: none;
background-color: #0f172a;
}
}prefers-reduced-data is a CSS media feature.
Treat as progressive enhancement.
Bottom line: Keep usable default styles outside the query.
Continue with prefers-reduced-transparency.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
2 people found this page helpful