Advertisement
Guest User

Untitled

a guest
Jan 11th, 2011
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. // modified linear-gradient mixin (supports ie gradient)
  2. @mixin simple-linear-gradient($start-color, $end-color, $start: top)
  3. $start: unquote($start)
  4. $end: opposite-position($start)
  5. $color-stops: color-stops($start-color, $end-color)
  6.  
  7. @if $experimental-support-for-webkit
  8. background-image: -webkit-gradient(linear, grad-point($start), grad-point($end), grad-color-stops($color-stops))
  9.  
  10. @if $experimental-support-for-mozilla
  11. background-image: -moz-linear-gradient($start, $color-stops)
  12.  
  13. background-image: linear-gradient($start, $color-stops)
  14.  
  15. @if $experimental-support-for-microsoft
  16. $gradient-type: 0
  17. @if $start == left
  18. $gradient-type: 1
  19.  
  20. $value: unquote("progid:DXImageTransform.Microsoft.Gradient(enabled=true, startColorstr=#{ie-rgba($start-color)}, endColorstr=#{ie-rgba($end-color)}, gradientType=#{$gradient-type})")
  21. @include experimental(filter, $value, not -moz, not -webkit, not -o, -ms, not -khtml, official)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement