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
When the paddingX styleprop is used, it becomes impossible to overwrite the padding with paddingLeft or paddingRight.
This can be a pitfall when creating custom components that can use prop spreading to get styles from a parent.
Steps to reproduce
functionMyCustomComponent(props: DivProps){return(<DivpaddingX="20px"{...props}>
Hello there!
</Div>);}functionApp(){return<MyCustomComponentpaddingLeft="50px"/>;// ⚠️ This padding will NOT be applied! It will stay 20px.}
Expected results
Because paddingLeft is more specific than paddingX, I expect it to take precedence over the paddingX rule.
Describe the bug
When the
paddingX
styleprop is used, it becomes impossible to overwrite the padding withpaddingLeft
orpaddingRight
.This can be a pitfall when creating custom components that can use prop spreading to get styles from a parent.
Steps to reproduce
Expected results
Because
paddingLeft
is more specific thanpaddingX
, I expect it to take precedence over thepaddingX
rule.Reproducible demo
https://codesandbox.io/embed/paddingx-paddingleft-bug-orbit-x4r5jd?fontsize=14&hidenavigation=1&module=%2FApp.tsx&theme=dark
The text was updated successfully, but these errors were encountered: