Replies: 3 comments
-
Hey @lionmat! You’ve got 4 breakpoints in that example but then are setting 5 values to the breakpoints. There may be a bug in our handling of an edge case like that, but you should only be using as many responsive values as you have breakpoints. (You can set as many breakpoints as you like.) |
Beta Was this translation helpful? Give feedback.
-
@lachlanjc Thanks for your comment. I thought Responsive values will be set something like this, am I wrong ? OK, I changed the code and tried again.
Even if I set like this, textAlign: "center" works but bg never changes to yellow. |
Beta Was this translation helpful? Give feedback.
-
Hmm, are you sure? If you have only one breakpoint, surely you can specify two values: one for below and one for above the breakpoint? |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I am new to Theme UI so, I am not sure if this is a bug or specification.
When using standard css media query in sx prop and setting a same value set for breakpoints, I found out responsive values doesn't work properly.
For example,
in src/gatsby-plugin-theme-ui/index.js
in src/components/test.js
In this settings, "yellow" background will be skipped.("pink" continues until "black")
Expected behavior
I was expecting to both works properly.
In above setting, "yellow" should be applied.
Additional context
This is happened when setting an exactly same value set for breakpoints (one of '640px', '768px', '1024px', '1280px')
So, If I set, for example
@media screen and (min-width: 1000px)"
It works well.
Also, If I comment out css media query, It works well too.
I wish I could fix the code, but I don't understand the inside code well, so I'll report it first. Thanks
Beta Was this translation helpful? Give feedback.
All reactions