NativeScript / NativeScript/tailwind
dark: not working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 161
- Forks
- 29
- Avg merge
- 1h 39m
- Merged PRs (30d)
- 1
Description
Can anyone help me understand this statement in the readme
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
darkMode: ['class', '.ns-dark'],
As when i use
bg-teal-500 dark:bg-cyan-700
for example , the styling does not get applied when using dark mode on the phone, only the default bg-teal-500 is ever applied .
I even added it as a plugin in the config
plugins: [
plugin(function ({ addVariant }) {
addVariant('android', '.ns-android &');
addVariant('ios', '.ns-ios &');
addVariant('dark','.ns-dark &')
}),
],
still no Joy. What am i doing wrong
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README's darkMode statement and the Tailwind config shown in the report. Reproduce the bg-teal-500/dark:bg-cyan-700 example on a phone, then trace whether the .ns-dark variant is applied. Done means the dark variant visibly overrides the default styling in dark mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, tailwindcss
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100