styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.27k stars 107 forks source link

Remove redundant styling props in the next major version of xstyled #377

Open quantizor opened 1 year ago

quantizor commented 1 year ago

There are a number of redundant props: bg vs backgroundColor, maxW vs maxWidth, maxH vs maxHeight

On the surface this doesn't seem like a big deal, but if you're making a component library using xstyled which has some base styling and allows overrides by the consumer, this could lead to issues if they don't match using the exact same prop.

We should choose to favor either the verbose or short versions and deprecate+remove the others to reduce complexity.

jguddas commented 1 year ago

Can you share an example where overriding does not work?

Doing it like this for example works just fine.

gregberge commented 1 year ago

@probablyup I see what do you mean. It is a breaking change but I should consider it!