Skip to content

Instantly share code, notes, and snippets.

@imathis
Created January 25, 2010 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imathis/285669 to your computer and use it in GitHub Desktop.
Save imathis/285669 to your computer and use it in GitHub Desktop.
@import compass/utilities.sass
@import compass/css3.sass
=gradient(!type, !webkit_coords, !moz_coords, !color_start, !color_end, !color_stop = false)
!webkit_gradient= "#{!webkit_coords}, from(#{!color_start}), to(#{!color_end})"
!moz_gradient = "#{!moz_coords}, #{!color_start}, #{!color_end}"
@if !color_stop
!webkit_gradient= !webkit_gradient + ", " + !color_stop
background-image: -webkit-gradient(#{!type}, #{!webkit_gradient})
background: -moz-#{!type}-gradient(#{!moz_gradient})
=linear-gradient(!start, !end, !color1, !color2, !color_stop = false)
+gradient("linear", !webkit_coords, !moz_coords, !color1, !color2, !color_stop)
=v-gradient(!color1, !color2, !color_stop = false)
+linear-gradient("left top, left bottom", "top", !color1, !color2, !color_stop)
=h-gradient(!color1, !color2, !color_stop = false)
+linear-gradient("left top, right top", "left", !color1, !color2, !color_stop)
=diagonal-left-top-gradient(!color1, !color2, !color_stop = false)
+linear-gradient("left top, right bottom", "left top", !color1, !color2, !color_stop)
=diagonal-left-bottom-gradient(!color1, !color2, !color_stop = false)
+linear-gradient("left bottom, right top", "left bottom", !color1, !color2, !color_stop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment