Skip to content

Instantly share code, notes, and snippets.

@lemnis
Last active December 23, 2015 10:49
Show Gist options
  • Save lemnis/6623784 to your computer and use it in GitHub Desktop.
Save lemnis/6623784 to your computer and use it in GitHub Desktop.
just a simple file with ie hacks / fixes
@mixin inline-block{
display: inline-block;
zoom: 1;
*display: inline;
}
@mixin opacity ($value) {
opacity: $value;
-ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=” $value * 100 “)”;
filter: alpha(opacity= $value * 100 );
zoom: 1;
}
@mixin rgba-background($color){
background: $color;
$color: ie-hex-str($color);
@media \0screen\,screen\9 {
background: transparent;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$color},endColorstr=#{$color});
zoom: 1;
}
}
@mixin ie-gradient($direction, $start, $end){
background: linear-gradient($direction, $start, $end);
$start: ie-hex-str($start);
$end: ie-hex-str($end);
@if $direction == to right{
$direction: 1;
}@else if $direction == to bottom{
$direction: 0;
}@else if $direction == to left{
$direction: 1;
$savVar: $start;
$start: $end;
$end: $savVar;
}@else if $direction == to top{
$direction: 0;
$savVar: $start;
$start: $end;
$end: $savVar;
}@else{
@warn "direction is not supported";
$direction: 1;
}
@media \0screen\,screen\9 {
background: transparent;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$start},endColorstr=#{$end},GradientType=#{$direction} );
zoom: 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment