Skip to content

Commit

Permalink
chore(update-plugins): Sat Jan 25 08:04:46 UTC 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
nativescript-oss committed Jan 25, 2025
1 parent b790e88 commit c1c4c84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/plugins/tailwindcss.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ Generate a `tailwind.config.js` with
npx tailwindcss init
```

Adjust `content`, `darkMode`, `corePlugins` plus any other settings you need, here are the values we recommend:
When the [NativeScript CLI](https://github.com/NativeScript/nativescript-cli) creates a new project, it may put code into a `src` folder instead of the `app` referenced below. Adjust `content`, `darkMode`, `corePlugins` plus any other settings you need. Here are the values we recommend. If you're struggling to get Tailwind working for the first time, check the `content` setting.

```js
// tailwind.config.js
const plugin = require('tailwindcss/plugin')

/** @type {import('tailwindcss').Config} */
module.exports = {
// check this setting first for initial setup issues
content: ['./app/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
darkMode: ['class', '.ns-dark'],
Expand Down

0 comments on commit c1c4c84

Please sign in to comment.