mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 19:16:11 +00:00
225 lines
4.1 KiB
SCSS
225 lines
4.1 KiB
SCSS
.card {
|
|
// functionality
|
|
perspective: 150rem;
|
|
position: relative;
|
|
height: 52rem;
|
|
|
|
&__side {
|
|
height: 52rem;
|
|
transition: all 0.58s ease;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
backface-visibility: hidden;
|
|
border-radius: 3px;
|
|
overflow: hidden;
|
|
box-shadow: $shadow-default;
|
|
|
|
&--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(0deg);
|
|
}
|
|
|
|
// Front side styling
|
|
|
|
&__picture {
|
|
background-size: cover;
|
|
height: 23rem;
|
|
background-blend-mode: screen;
|
|
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
|
|
|
|
&--1 {
|
|
background-image: linear-gradient(
|
|
to right bottom,
|
|
$color-secondary-light,
|
|
$color-secondary-dark
|
|
),
|
|
url(../../commons/images/nat-5.jpg);
|
|
}
|
|
|
|
&--2 {
|
|
background-image: linear-gradient(
|
|
to right bottom,
|
|
$color-primary-light,
|
|
$color-primary-dark
|
|
),
|
|
url(../../commons/images/nat-6.jpg);
|
|
}
|
|
|
|
&--3 {
|
|
background-image: linear-gradient(
|
|
to right bottom,
|
|
$color-tertiary-light,
|
|
$color-tertiary-dark
|
|
),
|
|
url(../../commons/images/nat-7.jpg);
|
|
}
|
|
}
|
|
|
|
&__heading {
|
|
font-size: 2.8rem;
|
|
font-weight: 300;
|
|
text-transform: uppercase;
|
|
color: $color-white;
|
|
position: absolute;
|
|
top: 12rem;
|
|
right: 2rem;
|
|
text-align: right;
|
|
width: 75%;
|
|
}
|
|
|
|
&__heading-span {
|
|
padding: 1rem 1.5rem;
|
|
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;
|
|
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
|
|
&__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) {
|
|
height: auto;
|
|
border-radius: 3px;
|
|
background-color: $color-white;
|
|
box-shadow: $shadow-default;
|
|
|
|
&__side {
|
|
height: auto;
|
|
transition: all 0.58s ease;
|
|
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;
|
|
}
|
|
|
|
// Back side
|
|
&__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: 5.5rem;
|
|
}
|
|
}
|
|
}
|