Thereβs an issue, it doesnβt look the same as what the code was originally.
What has to be fixed and adjusted to the multi colored code so it looks the same as the original?
Original is the left image
Original Code:
https://jsfiddle.net/f9h1wu75/
Multi Colored Code:
https://jsfiddle.net/a4nkzLbm/
.playButton {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
margin: auto;
width: 150px;
height: 195px;
background-color: black;
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2), 0 0 1px 2px black, inset 0 2px 2px -2px white, inset 0 0 2px 15px #47434c, inset 0 0 2px 22px black;
border-radius: 5px;
padding: 20px;
perspective: 700px;
&.active .button {
transform: translateZ(20px) rotateX(25deg);
box-shadow: 0 -10px 20px $color;
.light {
animation: flicker 0.2s infinite 0.3s;
}
.shine {
opacity: 1;
}
.shadow {
opacity: 0;
}
}
.button {
transition: all 0.3s cubic-bezier(1, 0, 1, 1);
transform-origin: center center -20px;
transform: translateZ(20px) rotateX(-25deg);
transform-style: preserve-3d;
background-color: #9b0621;
width: 100%;
height: 100%;
position: relative;
cursor: pointer;
background: linear-gradient(
darken($color, 25%) 0%,
darken($color, 33%) 30%,
darken($color, 33%) 70%,
darken($color, 25%) 100%
);
background-repeat: no-repeat;
&::before {
content: "";
background: linear-gradient(
rgba(white, 0.8) 10%,
rgba(white, 0.3) 30%,
darken($color, 35%) 75%,
darken($color, 45%)) 50% 50% / 97% 97%,
darken($color, 20%)
;
background-repeat: no-repeat;
width: 100%;
height: 50px;
transform-origin: top;
transform: rotateX(-90deg);
position: absolute;
top: 0;
}
.button::after {
content: "";
background-image: linear-gradient(
darken($color, 35%),
darken($color, 45%)
);
width: 100%;
height: 50px;
transform-origin: top;
transform: translateY(50px) rotateX(-90deg);
position: absolute;
bottom: 0;
box-shadow: 0 50px 8px 0px black, 0 80px 20px 0px rgba(0, 0, 0, 0.5);
}
.light {
opacity: 0;
animation: light-off 1s;
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(
adjust-hue(lighten($color, 20%), 35),
$color 40%,
transparent 70%
);
}
.dots {
position: absolute;
width: 100%;
height: 100%;
background-image: radial-gradient(
transparent 30%,
rgba(darken($color, 35%), 0.7) 70%
);
background-size: 10px 10px;
}
.characters {
position: absolute;
width: 100%;
height: 100%;
background:
linear-gradient(white, white) 50% 20%/5% 20%,
radial-gradient(circle, transparent 50%, white 52%, white 70%, transparent 72%) 50% 80%/33% 25%;
background-repeat: no-repeat;
}
.shine {
transition: all 0.3s cubic-bezier(1, 0, 1, 1);
opacity: 0.3;
position: absolute;
width: 100%;
height: 100%;
background:
linear-gradient(white, transparent 3%) 50% 50%/97% 97%,
linear-gradient(rgba(255, 255, 255, 0.5), transparent 50%, transparent 80%, rgba(255, 255, 255, 0.5)) 50% 50%/97% 97%;
background-repeat: no-repeat;
}
.shadow {
transition: all 0.3s cubic-bezier(1, 0, 1, 1);
opacity: 1;
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(transparent 70%, rgba(0, 0, 0, 0.8));
background-repeat: no-repeat;
}
}
}
@keyframes flicker {
0%, 100% { opacity: 1; }
80% { opacity: 0.8; }
}
@keyframes light-off {
0% { opacity: 1; }
80% { opacity: 0; }
}
// ββββββββββββββββββββββββββββββββββ
// Play Button Variation Mixin
// ββββββββββββββββββββββββββββββββββ
@mixin play-button-variation($color: white){
&.active .button { box-shadow: 0 -10px 20px $color; }
.button {
background: linear-gradient(
darken($color, 25%) 0%,
darken($color, 33%) 30%,
darken($color, 33%) 70%,
darken($color, 25%) 100%
);
&::before {
background: linear-gradient(
rgba(white, 0.8) 10%,
rgba(white, 0.3) 30%,
darken($color, 35%) 75%,
darken($color, 45%)
) 50% 50% / 97% 97%,
darken($color, 20%);
}
.button::after {
background-image: linear-gradient(
darken($color, 35%),
darken($color, 45%)
);
}
.light {
background-image: radial-gradient(
adjust-hue(lighten($color, 20%), 35),
$color 40%,
transparent 70%
);
}
.dots {
background-image: radial-gradient(
transparent 30%,
rgba(darken($color, 35%), 0.7) 70%
);
}
}
}