Instantly share code, notes, and snippets.

Embed
What would you like to do?
CSS Media Queries: Best Practices

CSS Media Queries: Best Practices

/* Style for every viewport width. */
.Component {
  background-color: tomato;
  color: black;
}

/* Style for viewports greater than 320px wide. */ 
@media (min-width: 20em) {
  .Component {
    background-color: blue;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment