-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.scss
119 lines (101 loc) · 1.91 KB
/
main.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
107
108
109
110
111
112
113
114
115
116
117
118
119
@import "prefixes";
body {
height: 100vh;
background-color: #f6f6f6;
text-align: center;
font-size: 3vmin;
}
.card {
width: 80vmin;
height: 80vmin;
position: absolute;
@include perspective(500vmin);
top: 50%;
left: 50%;
margin: -40vmin 0 0 -40vmin;
cursor: pointer;
}
.card:hover .face {
@include transition(all 0.3s ease-out);
}
.face {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
@include backface-visibility(visible);
@include transition(all 0.5s ease-out);
@include transform-origin(0 0);
@include box-shadow(0px 5px 20px 0px rgba(0,0,0,0.1));
}
.front {
@include transform(rotateY(-20deg));
z-index: 2;
background-color: #ccc;
background-position: center;
@include background-size(cover);
}
.back {
background-color: #fff;
@include transform(rotateY(0deg));
z-index: 1;
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
}
.card:hover .front {
@include transform(rotateY(-35deg));
}
#open_card {
display: none;
&:checked {
& + .card {
.front{
@include transform(rotateY(-165deg));
span {
background-color: rgba(#fff,0.95);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
@include transform(scale(-1, 1));
background-size: contain;
background-position: right bottom;
background-repeat: no-repeat;
}
}
}
.back {
@include transform(rotateY(-15deg));
}
}
}
.to,
.stamp,
.message {
padding: 2vmin;
p {
margin-top: 0.25em;
margin-bottom: 0.25em;
}
:first-child {
margin-top: 0;
}
:last-child {
margin-bottom: 0;
}
}
.to,
.message {
font-family: 'Dawning of a New Day', cursive;
}
.stamp {
width: 100%;
}