emotion-js/facepaint

Adding nested selectors at a given breakpoint

Open

#12 ouverte le 12 avr. 2018

Voir sur GitHub
 (0 commentaires) (2 réactions) (0 assignés)JavaScript (12 forks)github user discovery
feature requesthelp wanted

Métriques du dépôt

Stars
 (594 stars)
Métriques de merge PR
 (Métriques PR en attente)

Description

I have pseudo-selector classes that only appear at my larger breakpoint. Currently it appears that I have to put every property within them inside an array:

mq({
  '&>li:first-child': {
    background: [undefined, 'green'],
    width: [undefined, 200],
  },
})

(In practice there's many more properties in there.)

Is there any neater way I could write this, and if not could one be added? I feel like I should be able to do either:

mq({
  '&>li:first-child': [undefined,
    background: 'green',
    width: 200,
  ],
})

or

mq([undefined, {
  '&>li:first-child': {
    background: 'green',
    width: 200,
  },
}])

Guide contributeur