Skip to content

Instantly share code, notes, and snippets.

@bakura10
Created September 30, 2014 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakura10/603a8b9b2f6c2c474e8f to your computer and use it in GitHub Desktop.
Save bakura10/603a8b9b2f6c2c474e8f to your computer and use it in GitHub Desktop.
// ------------------------
// Organization n°1: put all the media queries at the end of the stylesheet
// ------------------------
.rule1 {
width: 100%;
h1 {
color: red;
}
}
// ... a lot of code
@include breakpoint($desktop) {
.rule1 {
width: 50%;
h1 {
color: green;
}
}
}
// ------------------------
// Organization n°2: put all the media queries per "major" block
// ------------------------
.rule1 {
width: 100%;
h1 {
color: red;
}
@include breakpoint($desktop) {
width: 50%;
h1 {
color: green;
}
}
}
// ------------------------
// Organization n°3: put all the media queries per rule
// ------------------------
.rule1 {
width: 100%;
@include breakpoint($desktop) {
width: 50%;
}
h1 {
color: red;
@include breakpoint($desktop) {
color: green;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment