-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.button.styl
88 lines (76 loc) · 2.46 KB
/
atom.button.styl
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[data-atom-button]
cursor: pointer
[data-atoms=app] [data-organism-header] &
> abbr
font-weight: FONT_WEIGHT_NORMAL
[data-atoms=app] [data-organism-header] > :not(.right):not(.left) &
background-color: darken(THEME, 15%)
&:not(:last-child)
margin-right: 1px
&:first-child
border-radius: (U / 4) 0 0 (U / 4)
&:last-child
border-radius: 0 (U / 4) (U / 4) 0
&.active
background-color: darken(THEME, 30%)
color: WHITE
[data-atoms=app] [data-organism-section] &
color: darken(BUTTON, 50%)
> abbr
font-weight: FONT_WEIGHT_NORMAL
&:not(.transparent)
background-color: BUTTON
border-radius: BORDER_RADIUS
&:not([disabled]):not(.transparent)
transition: opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease
PERCENT = 30%
&:active
color: WHITE
background-color: darken(BUTTON, PERCENT)
box-shadow inset 0 1px 0 rgba(0,0,0, 0.1)
&.accept
background-color: ACCEPT
&:active
background-color: darken(ACCEPT, PERCENT)
&.cancel
background-color: CANCEL
&:active
background-color: darken(CANCEL, PERCENT)
&.warning
background-color: WARNING
&:active
background-color: darken(WARNING, PERCENT)
&.theme
background-color: THEME
&:active
background-color: darken(THEME, PERCENT)
&:not(.accept):not(.cancel):not(.warning)
box-shadow inset 0 -1px rgba(0,0,0, 0.1)
&.accept, &.cancel, &.warning, &.theme
box-shadow inset 0 -1px rgba(0,0,0, 0.2)
color: WHITE
&[disabled]
background-color: darken(BACKGROUND, 10%)
& > abbr, & .icon
opacity: 0.75
[data-atoms=app] & > small
font-weight: bold
border-radius: .25rem
color: WHITE
background-color: THEME
[data-atoms=app] header & > small
background-color: DARK
@media screen and (min-width: 1024px)
[data-atoms=app] [data-organism-section] [data-atom-button]:not([disabled])
PERCENT = 15%
&:not(.accept):not(.cancel):not(.warning):not(.theme):hover
background-color: lighten(BUTTON, PERCENT)
color: WHITE
&.accept:hover
background-color: lighten(ACCEPT, PERCENT)
&.cancel:hover
background-color: lighten(CANCEL, PERCENT)
&.warning:hover
background-color: lighten(WARNING, PERCENT)
&.theme:hover
background-color: lighten(THEME, PERCENT)