Sherin Shaju
Sherin Shaju

Reputation: 266

Pseudo elements are not working in Material-UI makeStyles React.js

Pseudo elements are not working in Material-UI makeStyles .

innerBox: {
        borderRadius: "10px",
        background: "#fff",
        boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.36)",
        maxHeight: "50px",
        "& ::before": {
            content: "anything"
        }
    }

Upvotes: 2

Views: 2134

Answers (1)

Sabbin
Sabbin

Reputation: 2445

The problem here seems to be your selector, it's not correct instead of & ::before try &:before

innerBox: {
    borderRadius: "10px",
    background: "#fff",
    boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.36)",
    maxHeight: "50px",
    "&:before": {
        content: "anything"
    }
}

Upvotes: 2

Related Questions