Assumptions:
- Using Sass with
&ersand selector, limited nesting, and modular / partials-based file organization - Using BEM convention with limited nesting
Two lines of thought here:
- Organize media queries to be "inline" i.e. colocated with the selectors.
- pro: close to the code, context is clear
- con: potentially lots of media query declarations scattered throughout the CSS file
- All media queries for a component grouped together at the end of the file.
- pro: ... pretty much self-described: all the media queries are found in one spot
- con: contextually not as clear which elements have media query adjustments