google / google/material-design-lite

Clean up media queries

Open
#1,811 0 comments 2 reactions 0 assignees View on GitHub
BC Break P2 Tooling
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

Media queries can be made much easier with mixins. [David Walsh](http://davidwalsh.name/write-media-queries-sass)'s post on this is a fantastic example of how to make the source more legible and easier to maintain. Since in each component we'd call `@include tablet { // stuff for media query }` instead of manually redoing the min/max width rules and calling in variables.

Ideally, we look to MD spec to provide our base set of breakpoints and use them wherever appropriate via mixins to keep the source cleaner overall. Then for any parts that deviate from the primary breakpoints, manually create those as-needed component-wise.

Marking as BC break, since we could easily end up defining mixins that currently exist in user-land. Then depending on import structure in their apps, we could cause issues. Very minor edge-case, but existence is very much possible.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.