-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathbutton.css
More file actions
45 lines (43 loc) · 1.09 KB
/
button.css
File metadata and controls
45 lines (43 loc) · 1.09 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
.btn {
@apply relative gap-2 font-semibold no-underline duration-200 ease-out rounded-3xl inline-flex py-1 px-6 justify-center text-gray-200 w-full;
transition-property: color, background-color, border-color, opacity, box-shadow, transform;
@media (prefers-reduced-motion: no-preference) {
animation: button-pop var(--animation-btn, 0.25s) ease-out;
}
&:active:hover,
&:active:focus {
animation: button-pop 0s ease-out;
transform: scale(var(--btn-focus-scale, 0.97));
}
/* default btn */
& {
@apply no-underline;
}
&.btn-outline {
@apply bg-transparent border border-primary-900 text-gray-200 font-normal;
}
/* disabled */
&.btn-disabled,
&[disabled],
&:disabled {
@apply border-opacity-0 opacity-50 cursor-not-allowed;
}
@media (hover: hover) {
&-disabled:hover,
&[disabled]:hover,
&:disabled:hover {
@apply border-opacity-0 bg-opacity-20 text-opacity-20;
}
}
}
@keyframes button-pop {
0% {
transform: scale(var(--btn-focus-scale, 0.98));
}
40% {
transform: scale(1.02);
}
100% {
transform: scale(1);
}
}