tailwindcss-dark-mode | A Tailwind CSS plugin that adds variants for dark mode | Plugin library
kandi X-RAY | tailwindcss-dark-mode Summary
kandi X-RAY | tailwindcss-dark-mode Summary
A Tailwind CSS plugin that adds variants for dark mode
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tailwindcss-dark-mode
tailwindcss-dark-mode Key Features
tailwindcss-dark-mode Examples and Code Snippets
Community Discussions
Trending Discussions on tailwindcss-dark-mode
QUESTION
I have a Laravel/React+Tailwind project. I have a toggle button that successfully adds the class 'dark' to my element:
However, the dark class I am using does not apply. In the next screenshot, I show how the bg-blue-100 is successfully picked up by Tailwind (onload, the default is for 'dark' to not be in the element class list) and applied, but I have clicked on 'change theme' and therefore my
element contains the class 'dark', but the tailwind class
dark:bg-yellow-200
is not applied.
My tailwind file looks like this:
...ANSWER
Answered 2021-Apr-10 at 12:27I updated to the latest TailwindCSS package in NPM and it solved the problem.
QUESTION
I've been at this for a couple of days now and still can't seem to get this working. I'm trying to get the whole dark mode going with Tailwind CSS in Nuxt.js.
I think it may be an issue with the CSS setup and not the TypeScript side as I have a toggle that switches the class to light and dark.
As a reference, I've been trying to copy Fayazara's work which you can find here.
Env:
- Windows 10 Pro
- Node 14.15.4
- NPM 6.14.10
- Nuxt.js 2.14.12
- TailwindCSS 2.0.2
Here are some of the config files:
nuxt.config.js:
...ANSWER
Answered 2021-Jan-30 at 12:25Looks like you're using a third party plugin to enable dark mode support. TailwindCSS 2.0 (Which you're using) supports dark mode on its own, so no need to add the plugin.
Change your tailwind.config.js
to:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tailwindcss-dark-mode
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page