rebass icon indicating copy to clipboard operation
rebass copied to clipboard

Predefined styles for components conflict with custom styling

Open gfcf14 opened this issue 4 years ago • 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

gfcf14 avatar Sep 03 '21 14:09 gfcf14

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

wiscat avatar Apr 15 '22 17:04 wiscat