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.

No 'data-theme' attribute being set.

See original GitHub issue

Perhaps this is more a tippy-specific issue (rather than vue-tippy), but a majority of the CSS seems to key off a data-theme attribute being set. However no data-theme attribute appears to be getting set regardless of what theme is chosen. Currently using:

"tippy.js": "^6.2.3",
"vue-tippy": "^4.4.0"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kovetskiycommented, Jun 25, 2020

@KABBOUCHI I haven’t installed any other versions of tippy.js, I have only vue-tippy and this would not work:

import "tippy.js/themes/light.css";

for a very simple reason — tippy.js doesn’t exist in node_modules/ directory of my project, it exists in vue-tippy/node_modules/tippy.js/themes/light.css.

Please correct me if I’m wrong.

1reaction
magistr4815commented, Jun 25, 2020

@KABBOUCHI Hello! If you import styles as you say, then it will not work. I have installed on the project both tippy (used for old parts of the system without vue.js) and vue-tippy (used for new parts). And I faced the same problem. If you import as written in your documentation, it won’t work.

// Add additional themes.
import "tippy.js/themes/light.css";
import "tippy.js/themes/light-border.css";
import "tippy.js/themes/google.css";
import "tippy.js/themes/translucent.css";

You need to tweak the documentation.

@kovetskiy - you’re right! That’s right like that.

@import '~vue-tippy/node_modules/tippy.js/themes/light.css';
Read more comments on GitHub >

github_iconTop Results From Across the Web

Input checkbox not firing javascript for data-theme attribute
I'm trying to accomplish a few things to get dark mode working on my site. Use a checkbox to switch between light and...
Read more >
Using data attributes - Learn web development | MDN
HTML is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined ......
Read more >
HTML data-* Attribute - W3Schools
The data-* attribute gives us the ability to embed custom data attributes on all HTML elements. The stored (custom) data can then be...
Read more >
A Complete Guide to Data Attributes | CSS-Tricks
Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.
Read more >
Using attributes in templates | Theming Drupal
The job of the Attribute object is to store a set of HTML attributes, providing the developer helpful methods to interact with that...
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