emotion-js/facepaint

Adding nested selectors at a given breakpoint

オープン

#12 opened on 2018/04/12

 (0 件のコメント) (2 件のリアクション) (0 人の担当者)JavaScript (12 件のフォーク)github user discovery
feature requesthelp wanted

Repository metrics

Stars
 (594 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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,
  },
}])

コントリビューターガイド