Styled-system: How to use css pseudo element ?

Created on 2 Oct 2018  路  3Comments  路  Source: styled-system/styled-system

Hello, I can't figure out how to use css pseudo element, can you help me?

i.e :

  <Button
    {...props}
    mx='auto'
    border='1'
    borderColor='transparent'
    fontWeight='400'
    borderRadius='20rem'
    css={{
      '&::after': {
        content: "",
        position: 'absolute',
        top: 0,
        right: 0,
        bottom: 0,
        left: 0,
        zIndex: -10,
        backgroundColor: '#000',
        borderRadius: 'inherit',
        opacity: 0,
        transition: 'inherit',
      }
    }}
  />

Most helpful comment

Guessing this might鈥檝e been related to the content property https://theme-ui.com/object-styles#pseudo-elements

All 3 comments

So is it not possible to use a css pseudo element?

Guessing this might鈥檝e been related to the content property https://theme-ui.com/object-styles#pseudo-elements

Oh lawd. Thankyou!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

duro picture duro  路  5Comments

jacek213 picture jacek213  路  4Comments

philholden picture philholden  路  5Comments

wcastand picture wcastand  路  4Comments

lucastobrazil picture lucastobrazil  路  4Comments