aboutsummaryrefslogtreecommitdiff
path: root/source/stylesheets/library/_button_style.sass
blob: 2b68d5db01441c4e04d6ef80d5a422e0b3405904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
=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