emotion-js/facepaint

Adding nested selectors at a given breakpoint

Open

#12 创建于 2018年4月12日

在 GitHub 查看
 (0 评论) (2 反应) (0 负责人)JavaScript (12 fork)github user discovery
feature requesthelp wanted

仓库指标

Star
 (594 star)
PR 合并指标
 (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,
  },
}])

贡献者指南