Skip to content

Instantly share code, notes, and snippets.

@Snugug
Last active December 18, 2015 19:39
Show Gist options
  • Save Snugug/5834818 to your computer and use it in GitHub Desktop.
Save Snugug/5834818 to your computer and use it in GitHub Desktop.
// We're going to use Breakpoint to handle our media queries
// http://github.com/team-sass/breakpoint
@import "breakpoint";
@mixin element-query($sizes...) {
@each $size in $sizes {
@include breakpoint(nth($size, 2)) {
#{nth($size, 1)} & {
@content;
}
}
}
}
.schedule-component {
@include element-query('.content' 32.5em, 'aside' 90em) {
...styles here...
}
}
// I'll add this to https://github.com/Team-Sass/toolkit if you think it'll be useful
@scottjehl
Copy link

Hey @Snugug. Thanks for the example.

Part of our problem is that for each shared breakpoint, there are many selectors and styles that need to apply, rather than just one set of styles for a given selector.

I added more detail here if you're able to chime in. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment