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

Tailwindcss custom dark-mode ID breaks normal dark: class #137

Closed
Tracked by #108
aminya opened this issue Sep 25, 2024 · 0 comments
Closed
Tracked by #108

Tailwindcss custom dark-mode ID breaks normal dark: class #137

aminya opened this issue Sep 25, 2024 · 0 comments
Labels
CLI enhancement New feature or request

Comments

@aminya
Copy link

aminya commented Sep 25, 2024

In this example, the Astro code adds the dark class to the document, which matches the Tailwindss documentation. However, in the Tailwindcss config that Solid-ui generates, the class is changed from class to the following

darkMode: ["class", "[data-kb-theme=\"dark\"]"],

Based on the types in Tailwindcss, this means that the normal dark class doesn't work anymore for dark:

https://github.com/tailwindlabs/tailwindcss/blob/ed3c5356b77b6c428e9c0ea5bc32719dcdf94128/types/config.d.ts#L75

The correct value should be

darkMode: ["variant", [".dark &", "[data-kb-theme=\"dark\"] &"]],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants