xstyled icon indicating copy to clipboard operation
xstyled copied to clipboard

Remove redundant styling props in the next major version of xstyled

Open quantizor opened this issue 2 years ago • 2 comments

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.

quantizor avatar Jul 27 '22 17:07 quantizor

Can you share an example where overriding does not work?

Doing it like this for example works just fine.

jguddas avatar Jul 29 '22 11:07 jguddas

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

gregberge avatar Oct 15 '22 19:10 gregberge