Sha256: 6d17e6f7d03517d32a60ca0d624d4ab1a72cdbf47d06014612b177637fe4d2c3
Contents?: true
Size: 845 Bytes
Versions: 94
Compression:
Stored size: 845 Bytes
Contents
$tablet: 640px; $desktop: 1024px; @mixin media-query($args...) { $media-type: 'only screen'; $media-type-key: 'media-type'; $args: keywords($args); $expr: ''; @if map-has-key($args, $media-type-key) { $media-type: map-get($args, $media-type-key); $args: map-remove($args, $media-type-key); } @each $key, $value in $args { @if $value { $expr: "#{$expr} and (#{$key}: #{$value})"; } } @media #{$media-type} #{$expr} { @content; } } @mixin mobile() { $max: $tablet - 1; @include media-query($max-width: $max) { @content; } } @mixin tablet() { $max: $desktop - 1; @include media-query($max-width: $max) { @content; } } @mixin tablet-only() { $min: $tablet; $max: $desktop - 1; @include media-query( $min-width: $min, $max-width: $max ) { @content; } }
Version data entries
94 entries across 94 versions & 1 rubygems