Hello, do you know how I can modify my css code so that it works on my component ?
I replace "button" by my class name " Heavybtn". But for the span "transition", "gradient", I don't know how to proceed.
HTML:
<button>
<span class="transition"></span>
<span class="gradient"></span>
<span class="label">Button</span>
</button>
CSS:
.psc-Heavybtn{
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
font-size: 17px;
padding: 1em 2.7em;
font-weight: 500;
background: #1f2937;
color: white;
border: none;
position: relative;
overflow: hidden;
border-radius: 0.6em;
cursor: pointer;
}
.gradient {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
border-radius: 0.6em;
margin-top: -0.25em;
background-image: linear-gradient(
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0),
rgba(0, 0, 0, 0.3)
);
}
.label {
position: relative;
top: -1px;
}
.transition {
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
transition-duration: 500ms;
background-color: rgba(16, 185, 129, 0.6);
border-radius: 9999px;
width: 0;
height: 0;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.psc-Heavybtn:hover .transition {
width: 14em;
height: 14em;
}
.psc-Heavybtn:active {
transform: scale(0.97);
}