::before pseudo element not working in makeStyles

431 Views Asked by At

I am using makeStyles in react and I cannot figure out why the ::before content won't show. It will work if I make the content a picture but it doesn't show with text.

To clarify further the ::before element is not being rendered at all.

cardPoint: {
    alignSelf: 'center',
    justifySelf: 'start',
    maxWidth: '250px',
    position: 'relative',
    "&::before": {
        content: 'Look at me',
        display: 'inline-block',
        color: '#000',
    },
}
1

There are 1 best solutions below

1
On BEST ANSWER

I think you have to pass 'Look at me' as '"Look at me"':