Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

image-less RGBA backgrounds for real browsers and Internet Explorer

View cross-browser-rgba-mixin.scss
1 2 3 4 5 6 7
@mixin rgba-background($color, $opacity) {
background-color: $color;
background-color: rgba($color, $opacity);
background-color: transparent\9;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{'#'+hex(round($opacity*255)) + '' + hex(red($color)) + '' + hex(green($color)) + '' + hex(blue($color))},endColorstr=#{'#'+hex(round($opacity*255)) + '' + hex(red($color)) + '' + hex(green($color)) + '' + hex(blue($color))});
zoom: 1;
}
View cross-browser-rgba-mixin.scss
1 2 3 4 5 6 7 8 9 10 11
module Sass::Script::Functions
module SassHex
def hex(decimal)
Sass::Script::String.new("%02x" % decimal)
end
end
include SassHex
end
 
# All you should have todo is require the sass-hex.rb file
# I use this trick a lot in compass when extending sass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.