Skip to content

Commit 285eb9e

Browse files
committed
add ribbon animations
1 parent b4f697e commit 285eb9e

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
API_URL=http://localhost:3030
1+
API_URL=https://forautobackend.herokuapp.com
22
ENV=development

components/Cards/VehicleCardRibbons.module.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
@import 'vars.scss';
22

3+
4+
@keyframes zoomIn {
5+
0% {
6+
transform: scale(0);
7+
}
8+
70% {
9+
transform: scale(1.2);
10+
}
11+
100% {
12+
transform: scale(1);
13+
}
14+
}
15+
16+
@keyframes slideRight {
17+
0% {
18+
transform: translateY(-100%);
19+
}
20+
75% {
21+
transform: translateY(20%);
22+
}
23+
100% {
24+
transform: translateY(0);
25+
}
26+
}
27+
328
.ribbons {
429
position: absolute;
530
top: spacing(0.5);
@@ -14,6 +39,7 @@
1439
display: flex;
1540
position: relative;
1641
justify-content: center;
42+
animation-fill-mode: forwards;
1743
align-items: center;
1844
font-size: $font-size-s;
1945
border-radius: 50%;
@@ -24,7 +50,11 @@
2450
color: $color-white;
2551
text-transform: uppercase;
2652
background: var(--color-background);
53+
@media (max-width: $tablet - 1) {
54+
animation: zoomIn 0.6s ease-in;
55+
}
2756
@media (min-width: $tablet) {
57+
animation: slideRight 0.3s ease-in;
2858
justify-content: flex-start;
2959
border-radius: unset;
3060
width: auto;

styles/global.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,18 @@ textarea {
282282
}
283283
}
284284

285+
@keyframes zoomIn {
286+
0% {
287+
transform: scale(0);
288+
}
289+
70% {
290+
transform: scale(1.2);
291+
}
292+
100% {
293+
transform: scale(1);
294+
}
295+
}
296+
285297
.guy_svg__paperplane-icon {
286298
animation: moveAll 6s ease infinite alternate;
287299
}

0 commit comments

Comments
 (0)