-
Notifications
You must be signed in to change notification settings - Fork 217
/
style.final.scss
106 lines (95 loc) · 1.81 KB
/
style.final.scss
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
@import '../styles/base.scss';
:root {
--color-gray: #8c97b7;
--color-blue: #1c38f1;
--color-green: #1fcdb0;
--input-height: 3rem;
--transition-duration: 0.3s;
--transition-easing: cubic-bezier(0.5, 0, 0.5, 1);
--animation-duration: 0.8s;
}
body {
display: flex;
justify-content: center;
align-items: center;
background-color: #f9fbff;
}
.ui-form {
background: #fff;
box-shadow: 0 0.5rem 1rem #0003;
padding: 1rem;
border-radius: 0.25rem;
display: grid;
grid-template-columns: 1fr auto;
grid-template-rows: 1fr;
grid-column-gap: 1rem;
grid-template-areas: 'input button';
transition: all var(--transition-duration) var(--transition-easing);
will-change: transform;
--color: var(--color-gray);
&:focus-within {
--color: var(--color-blue);
}
animation: slide-up var(--animation-duration) var(--transition-easing);
> .ui-input,
> .ui-button {
animation-name: slide-up;
animation-fill-mode: both;
animation-timing-function: var(--transition-easing);
}
}
.ui-input {
grid-area: input;
padding: 0 1rem;
height: var(--input-height);
border: 2px solid var(--color);
border-radius: 0.25rem;
outline: none;
transition: inherit;
}
.ui-button {
grid-area: button;
border: none;
padding: 0 1rem;
color: white;
font-weight: bold;
border-radius: 0.25rem;
height: var(--input-height);
background-color: var(--color);
transition: inherit;
}
[data-show]:not([data-active]) {
display: none;
}
.ui-form {
overflow: hidden;
}
@keyframes slide-up {
from {
opacity: 0;
transform: translateY(100%);
}
to {
opacity: 1;
transform: none;
}
}
@keyframes shake {
20%,
40%,
60%,
80% {
transform: translateX(1%);
}
10%,
30%,
50%,
70%,
90% {
transform: translateX(-1%);
}
from,
to {
transform: none;
}
}