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

Component has a built-in margin-top: -10px effecting page styling #671

Closed
princefishthrower opened this issue Feb 10, 2021 · 1 comment
Closed

Comments

@princefishthrower
Copy link

princefishthrower commented Feb 10, 2021

I'm putting the <ReactTooltip/> component in my root layout for a Gatsby site, so I can use tooltips on any page of my site using that layout (hopefully irrelevant to this problem). The problem is, I notice that this component seemingly has a built-in margin-top: -10px CSS rule when it is rendered to the page?!

Obviously, this will cause style issues on any page it is included in. How can I get rid of this pesky -10px margin-top rule?

@rickyzhangca
Copy link

rickyzhangca commented Mar 8, 2022

happening to me as well, the result is the bottom of the tooltip is pointing 10px lower...

https://github.com/wwayne/react-tooltip/blob/f08e999e814dc76ceb645bc11b0fc782800e38a9/src/decorators/styler.js#L38

you can use something like

&.place-top {
    margin-top: -6px !important;
  }

to patch it it

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

3 participants