This file contains 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
// RGBa background | |
@mixin background-rgba($color, $alpha) { | |
$rgba: rgba($color, $alpha); | |
$ie-hex-str: ie-hex-str($rgba); | |
// Fallback for web browsers that doesn't support RGBa | |
background-color: $color; | |
// Reset background to transparent only in IE 6-8 using the backslash 9 hack http://webdood.com/?p=57 | |
background-color: transparent\9; | |
// RGBa with $alpha opacity | |
background-color: $rgba; |
This file contains 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
// Placeholder | |
@mixin placeholder { | |
&:-moz-placeholder { @content; } | |
&::-moz-placeholder { @content; } | |
&:-ms-input-placeholder{ @content; } | |
&::-webkit-input-placeholder { @content; } | |
} |
This file contains 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 vertical-grid($color:null, $alpha:null, $base-line-height:$base-line-height){ | |
// Remove unit | |
$base-line-height: $base-line-height / ($base-line-height * 0 + 1); | |
//Extract chanels | |
$get-red: red($color); | |
$get-green: green($color); | |
$get-blue: blue($color); |
This file contains 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 svg-graphic($imgfilename, $imgtype, $imgwidth, $imgheight) { | |
background-image: url('../img/' + $imgfilename + '.' + $imgtype); | |
background-image: url('../img/' + $imgfilename + '.svg'), none; | |
background-size: $imgwidth $imgheight; | |
} |
This file contains 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 font-smoothing($value: antialiased) { | |
@if $value == antialiased { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
@else { | |
-webkit-font-smoothing: subpixel-antialiased; | |
-moz-osx-font-smoothing: auto; | |
} | |
} |
This file contains 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 min-height($value){ | |
height: auto !important; | |
height: $value; | |
min-height: $value; | |
} | |
@mixin max-height($value){ | |
height: auto !important; | |
height: $value; | |
max-height: $value; |
This file contains 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
// higher resolution images for high resolution displays | |
@mixin hires-graphic($hdfile, $hdtype, $hdwidth, $hdheight) { | |
$filename: $hdfile + '.' + $hdtype; | |
$hdfilename: $hdfile + '@2x.' + $hdtype; | |
background-image: url('../images/' + $filename); | |
@media print, (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { | |
background-image: url('../images/' + $hdfilename) !important; | |
-webkit-background-size: $hdwidth $hdheight; | |
background-size: $hdwidth $hdheight; | |
} |
This file contains 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
// Sprite graphic for easy reuse | |
@mixin sprite-graphic($sprite-graphic-pos:null, $format: $sprite-graphic-format, $file: $sprite-graphic-file, $type: $sprite-graphic-type, $width: $sprite-graphic-width, $height: $sprite-graphic-height){ | |
@if $format == 'hires' { | |
@include hires-graphic($file, $type, $width, $height); | |
} | |
@if $format == 'svg' { | |
@include svg-graphic($file, $type, $width, $height); | |
} | |
@if $sprite-graphic-pos == 'null' {} | |
@else { |
This file contains 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
@function even($number) { | |
@return $number % 2 == 0; | |
} |
OlderNewer