www.moparisthebest.com/stylesheets/library/_button_style.sass
2009-11-05 21:34:41 -06:00

45 lines
1.3 KiB
Sass

=btn-border-color(!color)
border-color= darken(!color, 25)
=btn-text-shadow(!color)
!text_shadow = darken(!color, 25)
text-shadow= !text_shadow "1px 1px 1px"
=btn-style(!color)
!color1 = lighten(!color, 30)
!color2 = darken(!color, 20)
+h-linear-gradient(!color1, !color2)
background-color= !color
+btn-border-color(!color)
+btn-text-shadow(!color)
=btn-style-hover(!color)
!color = lighten(!color, 8)
!color1 = lighten(!color, 22)
!color2 = darken(!color, 38)
+h-linear-gradient(!color1, !color2)
background-color= !color
+btn-border-color(!color)
+btn-text-shadow(!color)
=btn-style-active(!color)
!color = darken(!color, 5)
!color1 = lighten(!color, 25)
!color2 = darken(!color, 35)
+h-linear-gradient(!color1, !color2)
background-color= !color
+btn-border-color(!color)
+btn-text-shadow(!color)
=btn-structure(!font_size, !border_width, !line_height = !font_size *1.2)
!v_padding = floor(!font_size/2.5)
!h_padding = floor(!font_size)
!v_padding_active = !v_padding - 1px
!h_padding_active = !h_padding - 1px
border-width= !border_width
font-size= !font_size
padding= !v_padding !h_padding
line-height= !line_height
&:active
border-width= !border_width + 1px
padding= !v_padding_active !h_padding_active