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

Allow using custom 'dark' class #76

Open
csansoon opened this issue May 13, 2024 · 0 comments
Open

Allow using custom 'dark' class #76

csansoon opened this issue May 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@csansoon
Copy link

Describe the feature in detail (code, mocks, or screenshots encouraged)

ModeWatcher is designed to automatically add and remove a dark class to the html element, facilitating theme management in conjunction with Tailwind.

However, Tailwind supports custom prefixes for its classes, which also requires using this prefix to the class used to detect dark mode. To address this, introducing a property in ModeWatcher that allows users to specify the class for dark mode detection could resolve the problem. This enhancement would ensure compatibility regardless of the class naming conventions used in Tailwind CSS.

Example

<script>
  import { ModeWatcherfrom 'mode-watcher'
</script>

<ModeWatcher customClass='custom-dark' />

What type of pull request would this be?

New Feature

Provide relevant links or additional information.

https://tailwindcss.com/docs/dark-mode#toggling-dark-mode-manually

@csansoon csansoon added the enhancement New feature or request label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant