I'm trying to add a dynamic underline. When hovering the element I can't change the "after" or "before elements using CSS.
I know this can be done with plain CSS, but its not working with vanilla-extract:
import { style } from "@vanilla-extract/css"
export const gradientunderline = style({
":before": {
content: "",
display: "block",
width: "100%",
height: "3px",
bottom: 0,
left: 0,
"-webkit-transform": "scaleX(0)",
"-webkit-transition": "transform 0.3s ease",
background: "linear-gradient(119.83deg, #F3BA88 22.41%, #B95BD7 42.19%, #E360D4 56.73%, #384AE8 74.14%)",
},
":hover:before": {
"-webkit-transform": "scaleX(1)",
},
})