emotion-js / emotion-js/facepaint

Adding nested selectors at a given breakpoint

Open
#12 0 comments 2 reactions 0 assignees View on GitHub
feature request help wanted
Dominant language
JavaScript
Stars
594
Forks
12
PR merge metrics
No merged PRs in 30d

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:

```js
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:

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

or

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.