-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
129 lines (114 loc) · 2.44 KB
/
styles.css
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
118
119
120
121
122
123
124
125
126
127
128
129
*,
*::before,
::after {
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
flex-wrap: wrap;
margin: 0%;
}
button {
margin: 1rem;
}
.btn {
background-color: var(--background-color);
color: #222;
padding: 0.5rem 1rem;
border: none;
outline: none;
position: relative;
cursor: pointer;
width: 10rem;
--background-color: #e3e3e3;
--border-size: 2px;
--accent-color: #0af;
}
.btn.btn-border-pop::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
border: var(--border-size) solid var(--background-color);
transition: top, left, right, bottom, 100ms ease-in-out;
}
.btn.btn-border-pop:hover::before,
.btn.btn-border-pop:active::before {
top: calc(var(--border-size) * -2);
left: calc(var(--border-size) * -2);
right: calc(var(--border-size) * -2);
bottom: calc(var(--border-size) * -2);
}
.btn.btn-background-slide::before {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: -1;
background-color: var(--accent-color);
transform: scaleX(0);
transform-origin: left;
transition: transform 200ms ease-in-out;
}
.btn.btn-background-slide:hover::before,
.btn.btn-background-slide:focus::before {
transform: scaleX(1);
}
.btn.btn-background-slide {
z-index: 1;
transition: color 200ms ease-in-out;
}
.btn.btn-background-slide:hover,
.btn.btn-background-slide:focus {
color: white;
}
.btn.btn-background-circle::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
background-color: var(--background-color);
border-radius: 50%;
transform: scale(1.5);
transition: transform 200ms ease-in-out;
}
.btn.btn-background-circle:hover::before,
btn.btn-background-circle:focus::before {
transform: scale(0);
}
.btn.btn-background-circle {
z-index: 1;
overflow: hidden;
background-color: var(--accent-color);
transition: color 200ms ease-in-out;
}
.btn.btn-background-circle:hover,
.btn.btn-background-circle:focus {
color: white;
}
.btn.btn-background-underline::before {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: var(--border-size);
background-color: var(--accent-color);
transform: scaleX(0);
transition: transform 200ms ease-in-out;
}
.btn.btn-background-underline:hover::before,
.btn.btn-background-underline:focus::before {
transform: scaleX(1);
}