Created
November 15, 2012 09:12
-
-
Save hiloki/4077554 to your computer and use it in GitHub Desktop.
CambletのアイコンをSass mixinでライブラリー化
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
// Camblet http://cambelt.co/ | |
// 高解像度向け対応 | |
@mixin cam-icon($width:16,$height:16,$type:avatar) { | |
display: inline-block; | |
width: $width + px; | |
height: $height + px; | |
background-image: url("http://cambelt.co/icon/" + $type + "/" + $width * 2 + "x" + $height * 2); | |
-webkit-background-size: 100% auto; | |
background-size: 100% auto; | |
} | |
$types: | |
avatar, | |
bubble, | |
clock, | |
calendar, | |
camera, | |
document, | |
email, | |
folder, | |
heart, | |
home, | |
minus, | |
plus, | |
question, | |
smiley, | |
star, | |
tick, | |
warning; | |
@each $type in $types { | |
.cam-icon-#{$type} { | |
@include cam-icon(36,36,$type); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment