Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predefined styles for components conflict with custom styling #1130

Open
gfcf14 opened this issue Sep 3, 2021 · 1 comment
Open

Predefined styles for components conflict with custom styling #1130

gfcf14 opened this issue Sep 3, 2021 · 1 comment

Comments

@gfcf14
Copy link

gfcf14 commented Sep 3, 2021

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

@wiscat
Copy link

wiscat commented Apr 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants