rebassjs/rebass

Predefined styles for components conflict with custom styling

gfcf14 opened this issue · 1 comments

I have noticed that, when I try to create components using Flex for example, I get the following on the browser:

image

which in turn introduces some css:

image

which conflict with my components if I am using custom style values:

image

To fix this thus far, I've had to use the !important rule to ensure my style gets applied. But is there a way to tell this packages components not to provide these values when not needed? I tried using a style prop as style={{ margin: 'unset' }} but that removes my margin-top

As a possible solution you can copy-paste Flex and Box components and remove the "margin: 0" line:

https://github.com/rebassjs/rebass/blob/master/packages/reflexbox/src/index.js