[babel-plugin] Enforce media query order
- Dominant language
- JavaScript
- Stars
- 10.3k
- Forks
- 481
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 13
Description
### Describe the feature request
Documenting in-progress work to make media queries deterministic. Currently there is no way to guarantee media query order, and we have been working on tackling this
```
const styles = stylex.create({
foo: {
width: {
default: 500,
'@media (max-width: 1280px)': 420,
'@media (max-width: 768px)': '100%',
}
}
});
```
Becomes:
```
const styles = stylex.create({
foo: {
width: {
default: 500,
// '@media (max-width: 1280px) and not (max-width: 768px)': 420,
// simplified to:
'@media (min-width: 768.1px) and (max-width: 1280px)': 420,
'@media (max-width: 768px)': '100%',
}
}
});
```
Contributor guide
Assessment
This issue has not been assessed yet.