generated from randyaajr/my-full-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_card.scss
161 lines (161 loc) · 4.67 KB
/
_card.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.card {
// functionality
perspective: 150rem;
-moz-perspective: 150rem;
position: relative;
height: 52rem;
&__side {
height: 52rem;
transition: all 0.8s ease;
position: absolute;
top: 0;
left: 0;
width: 100%;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
border-radius: 3px;
overflow: hidden;
box-shadow: 0 1.5rem 4rem rgba($color-black, 0.15);
&--front {
background-color: $color-white;
}
&--back {
transform: rotateY(180deg);
&-1 {
background-image: linear-gradient( to right bottom, $color-secondary-light, $color-secondary-dark);
}
&-2 {
background-image: linear-gradient( to right bottom, $color-primary-light, $color-primary-dark);
}
&-3 {
background-image: linear-gradient( to right bottom, $color-tertiary-light, $color-tertiary-dark);
}
}
}
&:hover &__side--front {
transform: rotateY(-180deg);
}
&:hover &__side--back {
transform: rotateY(0);
}
// front side styling
&__picture {
background-size: cover;
height: 23rem;
background-blend-mode: screen;
-webkit-clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
border-top-left-radius: 3px;
border-top-right-radius: 3px;
&--1 {
background-image: linear-gradient( to right bottom, $color-secondary-light, $color-secondary-dark), url(../img/nat-5.jpg);
}
&--2 {
background-image: linear-gradient( to right bottom, $color-primary-light, $color-primary-dark), url(../img/nat-6.jpg);
}
&--3 {
background-image: linear-gradient( to right bottom, $color-tertiary-light, $color-tertiary-dark), url(../img/nat-7.jpg);
}
}
&__heading {
font-size: 2.8rem;
font-weight: 300;
text-transform: uppercase;
text-align: right;
color: $color-white;
position: absolute;
top: 12rem;
right: 2rem;
width: 75%;
}
&__heading-span {
padding: 1rem 1.5rem;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
&--1 {
background-image: linear-gradient( to right bottom, rgba($color-secondary-light, 0.85), rgba($color-secondary-dark, 0.85));
}
&--2 {
background-image: linear-gradient( to right bottom, rgba($color-primary-light, 0.85), rgba($color-primary-dark, 0.85));
}
&--3 {
background-image: linear-gradient( to right bottom, rgba($color-tertiary-light, 0.85), rgba($color-tertiary-dark, 0.85));
}
}
&__details {
padding: 3rem;
ul {
list-style: none;
width: 80%;
margin: 0 auto;
}
li {
text-align: center;
font-size: 1.5rem;
padding: 1rem;
&:not(:last-child) {
border-bottom: 1px solid $color-grey-light-2;
}
}
}
// back side styling
&__cta {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
text-align: center;
}
&__price-box {
text-align: center;
margin-bottom: 8rem;
color: $color-white;
}
&__price-only {
font-size: 1.4rem;
text-transform: uppercase;
}
&__price-value {
font-size: 6rem;
font-weight: 100;
}
//@include respond(tab-port) {
@media only screen and (max-width: 56.25em),
only screen and (hover: none) {
height: auto;
border-radius: 3px;
background-color: $color-white;
box-shadow: 0 1.5rem 4rem rgba($color-black, 0.15);
&__side {
height: auto;
position: relative;
box-shadow: none;
&--back {
transform: rotateY(0);
clip-path: polygon(0 15%, 100% 0, 100% 100%, 0% 100%);
}
}
&:hover &__side--front {
transform: rotateY(0);
}
&__details {
padding: 1rem 3rem;
}
// FRONT SIDE STYLING
&__cta {
position: relative;
top: 0%;
left: 0;
transform: translate(0);
width: 100%;
padding: 7rem 4rem 4rem 4rem;
}
&__price-box {
margin-bottom: 3rem;
}
&__price-value {
font-size: 4rem;
}
}
}