-
Notifications
You must be signed in to change notification settings - Fork 301
Expand file tree
/
Copy pathbutton.scss
More file actions
117 lines (100 loc) · 2 KB
/
button.scss
File metadata and controls
117 lines (100 loc) · 2 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.button {
display: inline-flex;
z-index: 1;
align-items: center;
padding: .34rem 1.2rem;
font-weight: 500;
letter-spacing: .5px;
background-color: transparent;
position: relative;
border:0;
text-decoration: none;
overflow: hidden;
border-radius: 5px;
color: var(--primary-color-dark);
transition: transform .2s, background .3s, box-shadow .3s, color .3s;
> span {
z-index: 2;
}
> svg + span {
margin-left: .25rem;
}
&:hover {
box-shadow: var(--glow);
transform: translateY(-1px);
}
&:after {
content: " ";
top:0;
bottom:0;
left:0;
right:0;
position: absolute;
border: 1px solid currentColor;
border-radius: 5px;
transition: opacity .3s, box-shadow .3s;
opacity: .6;
box-shadow: inset -1px -2px 0px 0px rgba(0,0,0,.05);
}
&:active:after {
box-shadow: none;
}
&:hover:after {
opacity: 1;
}
&.primary {
color: #FFF;
background-color: var(--primary-color-dark);
&:after {
border-color: rgba(0,0,0,.1);
}
&:before {
content: '';
z-index: -1;
position: absolute;
bottom: 100%;
right: 100%;
width: 1em;
height: 1em;
border-radius: 50%;
background-color: var(--primary-color);
transform-origin: center;
transform: translate(50%, 50%) scale(0);
transition: transform .2s ease-in-out;
}
&:focus:before,
&:hover:before {
transform: translate(50%, 50%) scale(20);
}
}
&--small {
font-size: .85rem;
padding: .35rem .7rem;
}
&--xsmall {
font-size: .7rem;
padding: .3rem .7rem;
}
&--icon {
padding-left: .6rem;
padding-right: .6rem;
}
&--blank {
background-color: transparent;
border-color: transparent;
padding-left:0;
padding-right:0;
box-shadow: none!important;
&:not(:hover) {
color: currentColor;
opacity: .6;
}
&:after {
display: none;
}
}
&--large {
font-size: 1.2rem;
padding: .5rem 1.5rem;
}
}