Skip to content

Instantly share code, notes, and snippets.

Avatar

Rene Koch renekoch

  • First Edition ApS
  • Denmark
View GitHub Profile
@renekoch
renekoch / _font-face.scss
Created Apr 10, 2013
Sass file, make a font face
View _font-face.scss
@mixin font-face($font-family, $url, $weight: normal, $style: normal, $svgadd: "Regular") {
@font-face {
font-family: $font-family;
src: url($url + ".eot");
src: url($url + ".eot?#iefix") format("embedded-opentype"),
url($url + ".woff") format("woff"),
url($url + ".ttf") format("truetype"),
url($url + ".svg#" + $font-family + $svgadd) format("svg");
font-weight: $weight;
font-style: $style;
@renekoch
renekoch / _inline-block.scss
Created Apr 10, 2013
Sass file for cross-browser inline-block (NOTE: this does not work on native block elements in IE6/IE7)
View _inline-block.scss
@mixin inline-block($vert-align: top) {
display:inline;
display:-moz-inline-stack;
display:inline-block;
vertical-align: $vert-align;
zoom:1;
min-height:0px;
}
@renekoch
renekoch / _gradient.scss
Last active Dec 16, 2015
Sass file to set cross browser background gradient
View _gradient.scss
@mixin gradient($color1, $color2, $dir : "h", $height: 100){
$webkit: right top;
$others: left;
$repeat: repeat-y;
@if ($dir == "horz") or ($dir == "h") or ($dir == "horizontal") {
$webkit: left bottom;
$others: top;
$repeat: repeat-x;
@renekoch
renekoch / _rounded-corner.scss
Created Apr 10, 2013
Sass file for rounded-cormers
View _rounded-corner.scss
@mixin round-corner($vert, $horz, $radius: 4px) {
-webkit-border-#{$vert}-#{$horz}-radius: $radius;
-moz-border-radius-#{$vert}#{$horz}: $radius;
border-#{$vert}-#{$horz}-radius: $radius;
}
@mixin rounded-corners($radius:4px){
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-o-border-radius: $radius;