-
-
Save eightdotthree/6555523 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin bp($point) { | |
@if $point == print { | |
@media only print { @content; } | |
} | |
} | |
@mixin em_width($px) { width: #{$px / 16}em; } | |
@mixin em_maxwidth($px) { max-width: #{$px / 16}em; } | |
@mixin em_minwidth($px) { min-width: #{$px / 16}em; } | |
@mixin em_maxheight($px) { max-height: #{$px / 16}em; } | |
@mixin em_minheight($px) { min-height: #{$px / 16}em; } | |
@mixin em_margin($top:0,$right:0,$bot:0,$left:0) { margin: #{$top / 16}em #{$right / 16}em #{$bot / 16}em #{$left / 16}em } | |
@mixin em_padding($top:0,$right:0,$bot:0,$left:0) { padding: #{$top / 16}em #{$right / 16}em #{$bot / 16}em #{$left / 16}em } | |
@mixin em_fontsize($px) { font-size: #{$px / 16}em; } | |
// My setup for sprites | |
@import "../img/*.png"; | |
@include all-img-sprites; | |
$sprites: logo_header cats; | |
@mixin sprite-dimensions($name) { | |
width: img-sprite-width($name); | |
height: img-sprite-height($name); | |
} | |
.sprite { | |
display: inline-block; | |
background-color: transparent; | |
} | |
@each $sprite in $sprites { | |
.#{$sprite} { | |
@include img-sprite($sprite); | |
@include sprite-dimensions($sprite); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment