-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.scss
89 lines (79 loc) · 1.77 KB
/
style.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
$color-purple: #8B5CF6;
$color-pink: #EC4899;
$color-gray: #9CA3AF;
$color-black: #1F2937;
$card-size: 23rem;
body {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
background-image: linear-gradient(45deg, $color-purple, $color-pink);
font-family: 'Montserrat', sans-serif;
}
* {
box-sizing: border-box;
}
.carousel {
position: relative;
width: $card-size;
height: $card-size;
perspective: 500px;
transform-style: preserve-3d;
}
.card-container {
position: absolute;
width: 100%;
height: 100%;
transform:
rotateY(calc(var(--offset) * 50deg))
scaleY(calc(1 + var(--abs-offset) * -0.4))
translateZ(calc(var(--abs-offset) * -30rem))
translateX(calc(var(--offset) / var(--abs-offset) * -5rem));
filter: blur(calc(var(--abs-offset) * 1rem));
transition: all 0.3s ease-out;
}
.card {
width: 100%;
height: 100%;
padding: 2rem;
background-color: hsl(280deg, 40%, calc(100% - var(--abs-offset) * 50%));
border-radius: 1rem;
color: $color-gray;
text-align: justify;
transition: all 0.3s ease-out;
h2 {
text-align: center;
font-size: 2rem;
font-weight: bold;
margin: 0 0 0.7em;
color: $color-black;
}
p, h2 {
transition: all 0.3s ease-out;
opacity: var(--active);
}
}
.nav {
color: white;
font-size: 5rem;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
top: 50%;
z-index: 2;
cursor: pointer;
user-select: none;
background: unset;
border: unset;
&.left {
transform: translateX(-100%) translatey(-50%);
}
&.right {
right: 0;
transform: translateX(100%) translatey(-50%);
}
}