You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Sorry if this has been reported (I did a little search, didn't find anything).
If you use responsive array values for a prop in the theme object, but then don't use them when you override it with the sx prop, then the default theme value
is applied.
To Reproduce
I'm on version 0.3.1. Can reproduce in Chrome and Safari.
If in my theme, I can provide a default height value as a responsive array, like so
variants: {forms: {input: {height: [3,4,5]}}}
But if I override it in an instance like this
<Inputsx={{height: 2}}/>
Then all of those breakpoints are still applied, and the height of 2 doesn't get applied.
Expected behavior
From a JSX syntax perspective, I expect the height given to completely override the height
in the default. I get that what's happening under the hood with CSS is a bit differnet though.
If this is a wontfix, I'd suggest maybe adding a note to the docs?
Additional context
From what I can tell, this is happening because the media queries are appended to the end of the stylesheet.
I think this has been discussed in #43 and #720. It's something I'd like to address for v1, but haven't seen a good solution yet from the implementation side
Describe the bug
Sorry if this has been reported (I did a little search, didn't find anything).
If you use responsive array values for a prop in the theme object, but then
don't use them when you override it with the
sx
prop, then the default theme valueis applied.
To Reproduce
I'm on version 0.3.1. Can reproduce in Chrome and Safari.
If in my theme, I can provide a default height value as a responsive array, like so
But if I override it in an instance like this
Then all of those breakpoints are still applied, and the height of 2 doesn't get applied.
Expected behavior
From a JSX syntax perspective, I expect the
height
given to completely override the heightin the default. I get that what's happening under the hood with CSS is a bit differnet though.
If this is a wontfix, I'd suggest maybe adding a note to the docs?
Additional context
From what I can tell, this is happening because the media queries are appended to the end of the stylesheet.
i.e.
The text was updated successfully, but these errors were encountered: