A powerful Sass mixin for creating complex, maintainable media queries with intuitive syntax and advanced features.
mq-scss is an advanced Sass media query mixin that simplifies writing complex responsive CSS. It enables developers to create intricate media query logic—like combined conditions, ratio-based queries, and named breakpoint variables—far beyond basic min/max width, making responsive code more maintainable and expressive.
Frontend developers and CSS architects working on complex responsive designs who need to manage intricate breakpoint logic and maintainable stylesheets in Sass projects.
Developers choose mq-scss for its intuitive API that supports advanced features like combined 'or' and 'plus' (AND) statements, ratio-based queries, and reusable media query variables, reducing the complexity of writing and maintaining responsive CSS compared to plain CSS or basic mixins.
Extremely powerful Sass media query mixin. Allows you to create almost any media query you can imagine.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically adjusts pixel values (e.g., min-width 600px outputs as 601px) to prevent conflicts, as shown in the basic usage examples, making queries more reliable.
Allows defining named media query variables (e.g., $MQ-element__color--main) for better organization and maintainability, enabling single-point updates across stylesheets.
Supports 'or' statements for disjunctive conditions and 'plus' (AND) statements for conjunctive logic, enabling complex media query construction beyond plain CSS.
Enables aspect-ratio and device-aspect-ratio media queries with string values (e.g., '2 / 1'), useful for full-screen responsive layouts, as detailed in the ratio-based section.
Offers debug mode to output detailed console logs for troubleshooting query construction, which can be enabled locally or globally, as explained in the Debug section.
The 'plus' keyword cannot be used with 'outside' range types or contain 'or' statements, requiring workarounds or nested queries, as admitted in the README under limitations.
Users must manually define and manage breakpoint variables (e.g., $BP-mobile: 600px), adding setup overhead compared to libraries with predefined breakpoints.
Exclusively works with Sass/SCSS, requiring import from node_modules, making it unsuitable for projects using other CSS preprocessors or vanilla CSS.
Repeated use of MQ variables can lead to duplicated media queries in CSS output, though the README notes it's negligible after gzipping, it still increases file size.