Sha256: 1b90c2944685084925ab7bc55cce8ee6e7fd955e6101de32ce42f5d01060444a
Contents?: true
Size: 1.48 KB
Versions: 2
Compression:
Stored size: 1.48 KB
Contents
// --------------- // MEDIA QUERY // --------------- @function _translateSize($size) { // if number, return it as it is @if type-of($size) == number { @return $size; } // if keyword, translate from the map @else { @return map-get($_media-sizes, $size); } } @mixin below($named-size) { @if $responsive { $in-media: true !global; $size: _translateSize($named-size); @if $named-size == retina { @media only screen and (-webkit-max-device-pixel-ratio: 2), (max-resolution: $size) { @content; } } @else { @media only screen and (max-width: $size) { @content; } } $in-media: false !global; } } @mixin above($named-size) { @if $responsive { $in-media: true !global; $size: _translateSize($named-size) + 1px; @if $named-size == retina { @media only screen and (-webkit-min-device-pixel-ratio: 2), (min-resolution: $size) { @content; } } @else { @media (min-width: $size) { @content; } } $in-media: false !global; } } @mixin between($smaller-size, $larger-size) { @if $responsive { $in-media: true !global; $smaller-size: _translateSize($smaller-size); $larger-size: _translateSize($larger-size); @media only screen and (min-width: $smaller-size) and (max-width: $larger-size) { @content; } $in-media: false !global; } } @mixin print { @media only print { @content; } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
edge_framework-2.1.1 | assets/sass/edge/utility/_media.scss |
edge_framework-2.1.0 | assets/sass/edge/utility/_media.scss |