Skip to content

Instantly share code, notes, and snippets.

@barryblando
Last active January 3, 2019 03:15
Show Gist options
  • Save barryblando/6e90f6df21982ffedba8085f97039ce3 to your computer and use it in GitHub Desktop.
Save barryblando/6e90f6df21982ffedba8085f97039ce3 to your computer and use it in GitHub Desktop.
CSS media query rules - Easy to understand

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