question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default dark theme causes issues with custom theme

See original GitHub issue

Here’s my use case. I have two kinds of popovers :

  • custom popovers / floating menus, so I want to have control over their look&feel,
  • regular tooltips, then I’m fine with default dark theme.

Problem is: some parts of the default dark theme have on effect on my custom tippys.
For example, .tippy-backdrop is not prefixed by .dark-theme so its black background is visible on my custom tippys.

The following CodePen is inspired by the doc, and you can see tomato olor being replace by a dark color : https://codepen.io/anon/pen/MxYerG

Suggestion: make all default CSS dependent of the .dark-theme CSS class.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
atomikscommented, Feb 26, 2019

I’m not really sure what you’re asking – you need to follow the CSS in the themes section so that the backdrop gets properly styled and doesn’t affect the different color.

.tippy-tooltip.tomato-theme[data-animatefill] {
  background-color: transparent;
}

.tippy-tooltip.tomato-theme .tippy-backdrop {
  background-color: tomato;
}

Edit: ok I understand actually, and I think I agree. I never bothered putting the dark-theme specific CSS underneath the dark-theme name. Not sure if that would be a breaking change since by default the tooltip gets that class name. Although to be fair the only “dark-theme” specific thing there is the background-color. Everything else is the “global CSS” of a tippy that you can override without much issue.

0reactions
Semahocommented, Mar 4, 2019

Ok, maybe I just should have used Popper for the custom one, I came with Tippy first and didn’t think about this solution before now. Thank you for the quick answers 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default theme refuses to load properly, and looks like the Dark ...
When attempting to change my theme in the customize window, mousing over the Default theme does show the proper colors for it, but...
Read more >
Fixing the dark mode flash issue on server rendered websites
Bringing a proper solution to dark mode flashing without an ugly hack.
Read more >
Dark theme - Android Developers
Dark theme applies to both the Android system UI and apps running on the device. ... mode flags and gives the app a...
Read more >
How to edit default dark theme for Visual Studio Code?
In VS code 'User Settings', you can edit visible colours using the following tags (this is a sample and there are much more...
Read more >
10 Common WordPress Theme Issues & How To Fix Them
The most likely cause of this error is that you made manual changes to your template files such as the style.css file (usually)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found