Style
/ API Reference / Plugins
Style
/ API Reference / Plugins

pseudoElement

This plugin allows you to style pseudo-elements (like ::before and ::after) using inline styles.

The Gist

import { pseudoElementPlugin } from '@weser/style'

const plugin = pseudoElementPlugin()

Returns

(Plugin) A plugin function that can be passed to the createRenderer function.

Usage

const style = {
  position: 'relative',
  '::before': {
    content: '""',
    position: 'absolute',
    top: 0,
    left: 0,
  },
}
On this page