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.

className does not seem to work

See original GitHub issue

Hi, maybe I didn’t understand something in the docs, but when I pass the options of my toast:

this.$toasted.show('New user added.', {duration: 1000, className: 'toasts'})

duration works, className has no effect, while if I edit it with containerClass it works:

this.$toasted.show('New user added.', {duration: 1000, containerClass: 'toasts'})

anybody can tell me why? I am using @nuxtjs/toast but I tested it also using pure vue-toasted.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
sduncan-mbtcommented, Mar 5, 2021

I was having the same issue as you guys. After reading this I did a little testing and by blanking the theme with say theme: 'none' I was able to then use my tailwind class as I wanted to with say className: 'bg-red-500'

happy days 😃

2reactions
arifwidipcommented, Jul 31, 2019

You can override the style by increasing the specificity of the selector rather than using !important, for example:

.toasted.toasted-primary.my-toasted-theme {
  background: #f00;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

ClassName styles not working in react - Stack Overflow
I am using webpack style and css loaders so it should allow me to require/import my styles straight into my jsx and handle...
Read more >
className not working without using styles #110 - GitHub
It seems that the compiler was not able to recognize className = "". If I define the body{} by import "./index.css" , it...
Read more >
How to fix className styles not working in React and JavaScript
In this tutorial we can resolve className styles not working in React and JavaScript.Just rename the the css or scss file to filename.module ......
Read more >
className doesn't seem to work — DataTables forums
I have been trying using the className option with no success. Here is what I have: "columnDefs": [ {"className": "semi-bold", "targets": [2]}
Read more >
Why you have to use className in React, but not in Preact?
The only reason behind the fact that it uses className over class is that the class is a reserved keyword in JavaScript and...
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