UNPKG

stylelint-sustainable-css

Version:

Sustainable CSS is a Stylelint plugin dedicated to following sustainable web design principles.

28 lines (21 loc) 518 B
## avoid-duplicate-media-queries ### Optimise Media Queries **Guideline:** Combine similar media queries and avoid redundant declarations within them to keep stylesheet size minimal. ```css /* Instead of this */ @media screen and (max-width: 768px) { .header { ... } } @media screen and (max-width: 768px) { .footer { ... } } /* Use this */ @media screen and (max-width: 768px) { .header { ... } .footer { ... } } /* Or Use this */ @media screen and (max-width: 768px) { .header, .footer { ... } } ```