Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Media query shorthand sugar
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
.gitignore
README.md
component.json
media.scss

README.md

sass-media

Media query shorthand sugar to make complex media queries a little more legible.

API

@include media(breakpoint [[,] breakpoint ...]);

Prints a media query. Spaces resolve to and and commas resolve to ,.

USAGE

@import 'media';

$medium: 'min-width: 480px';
$large: 'min-width: 1024px';
$portrait: 'orientation: portrait';

@include media($medium) { ... }
// => @media (min-width: 480px) { ... }

@include media($medium, $large) { ... }
// => @media (min-width: 480px), (min-width: 1024px) { ... }

@include media($large $portrait) { ... }
// => @media (min-width: 1024px) and (orientation: portrait) { ... }
Something went wrong with that request. Please try again.