I need to apply some CSS rules to ::before and ::after, but I can't figure out how.
I tried passing inline styles to my component like this (using JSX):
const color: '#fff';
const style = {
  '::before': { backgroundColor: color },
  '::after': { backgroundColor: color },
};
<div style={ style }>
I tried other permutations as well, such as ':before', '&::before', before... nothing seems to work.
Is this even supported by React? If so, what's the right way of doing it using inline styles?
 
     
    