Skip to content

Instantly share code, notes, and snippets.

@ysakmrkm
Created April 19, 2012 04:20
Show Gist options
  • Save ysakmrkm/2418553 to your computer and use it in GitHub Desktop.
Save ysakmrkm/2418553 to your computer and use it in GitHub Desktop.
Common variables
@function margin($margin,$lheight,$base){
@return $margin + (((1 - (($lheight) / $base)) / 2) * $base);
}
@function pxtoem($target,$base){
@return ($target / $base)+em;
}
@function emtopx($target,$base){
@return ($target * $base)+px;
}
@mixin clearfix {
&:before ,
&:after {
content:"";
display:table;
}
&:after {
clear:both;
}
* html & {
zoom:1;
}
*+html & {
zoom:1;
}
}
@mixin rover($width,$height,$bg,$ext:'gif',$color:''){
@if $bg != '' {
@if $color != '' {
background:url('../img/' + $bg + '.' + $ext) left top no-repeat $color;
} @else {
background:url('../img/' + $bg + '.' + $ext) left top no-repeat;
}
}
a {
display:block;
@if $width != '' {
width:$width + px;
}
@if $height != '' {
height:$height + px;
}
&:hover {
background:none;
img {
width:0px !important;
height:0px !important;
vertical-align:top;
}
}
}
}
$font_goth:"ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro","メイリオ","Meiryo","MS Pゴシック",sans-serif;
$font_min:'ヒラギノ明朝 Pro W3','Hiragino Mincho Pro','MS P明朝','MS PMincho',serif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment