Transformed media queries leave gaps between breakpoints
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by locating the media-query transformation exercised by the provided reproduction and compare its generated upper-bound condition with the expected output. Add a regression test using the supplied input and output, then verify that the interval before 64rem is continuous and excludes 64rem.
Written by the indexing model from the issue text.
Description
Describe the issue
Take this create call:
const styles = stylex.create({
foo: {
gridColumn: {
default: '1 / 2',
'@media (width >= 48rem)': '1 / 3',
'@media (width >= 64rem)': '1 / -1',
},
},
});
It is now transformed at compile time to:
const styles = stylex.create({
foo: {
gridColumn: {
default: '1 / 2',
'@media (width >= 48rem) and (width <= 63.99rem) ': '1 / 3',
'@media (width >= 64rem)': '1 / -1',
},
},
});
Expected behavior
It should be transformed to:
const styles = stylex.create({
foo: {
gridColumn: {
default: '1 / 2',
'@media (width >= 48rem) and (width < 64rem) ': '1 / 3',
'@media (width >= 64rem)': '1 / -1',
},
},
});
Steps to reproduce
const styles = stylex.create({
foo: {
gridColumn: {
default: '1 / 2',
'@media (width >= 48rem)': '1 / 3',
'@media (width >= 64rem)': '1 / -1',
},
},
});
Test case
Input:
const styles = stylex.create({
foo: {
gridColumn: {
default: '1 / 2',
'@media (width >= 48rem)': '1 / 3',
'@media (width >= 64rem)': '1 / -1',
},
},
});
Output:
const styles = stylex.create({
foo: {
gridColumn: {
default: '1 / 2',
'@media (width >= 48rem) and (width < 64rem) ': '1 / 3',
'@media (width >= 64rem)': '1 / -1',
},
},
});
Additional comments
No response
- Dominant language
- JavaScript
- Stars
- 10.3k
- Forks
- 485
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from facebook/stylex
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·