Skip to content

Instantly share code, notes, and snippets.

@jgv
Created January 18, 2011 19:39
Show Gist options
  • Select an option

  • Save jgv/785000 to your computer and use it in GitHub Desktop.

Select an option

Save jgv/785000 to your computer and use it in GitHub Desktop.
scss is the bestest. (need bleeding edge gem to make functions work)
/* @MIXINS */
@mixin rounded-corners($radius) {
border-radius: $radius;
-moz-border-radius: $radius;
-webkit-border-radius: $radius;
-khtml-border-radius: $radius;
}
@mixin rounded-top($side, $radius) {
border-top-#{$side}: $radius;
-moz-border-radius-top#{$side}: $radius;
-webkit-border-top-#{$side}-radius: $radius;
-khtml-border-radius-top#{$side}: $radius;
}
@mixin rounded-bottom($side, $radius) {
border-bottom-#{$side}: $radius;
-moz-border-radius-bottom#{$side}: $radius;
-webkit-border-bottom-#{$side}-radius: $radius;
-khtml-border-radius-bottom#{$side}: $radius;
}
@mixin hp-opacity($trans) {
filter: alpha(opactiy=($trans * 100));
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opactiy=#{$trans * 100})";
-moz-opacity: $trans;
-khtml-opacity: $trans;
opacity: $trans;
}
@function gray($amt, $opacity:nil){
@if $opacity != nil {
@return rgba($amt,$amt,$amt,$opacity);
} @else {
@return rgb($amt,$amt,$amt);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment