nextron: Tailwind customization doesn't work
Trying to use Tailwind with Nextron, but customization isn’t working
- Install/Run the
/with-typescript-tailwindcss
example https://github.com/saltyshiomix/nextron/tree/master/examples/with-typescript-tailwindcss - Try to use the already defined color
accent-1
https://github.com/saltyshiomix/nextron/blob/master/examples/with-typescript-tailwindcss/renderer/tailwind.config.js#L7 in the code.
If I use it as a className
, for instance here
<span className='text-accent-1'>⚡ Electron ⚡</span>
The color is not taking any effect
If I try to apply it the css
html,
body {
@apply bg-gray-900 text-accent-1;
}
I get the following error
Finally if I try to add any custom color following the instructions here https://tailwindcss.com/docs/customizing-colors
It doesn’t work
The thing is, I have a Nextjs project using tailwind in this exact way and it works. That’s the main reason I’m opening this issue.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- Merge pull request #165 from CreedDE/master allow custom tailwind configuration: related #156 — committed to saltyshiomix/nextron by saltyshiomix 3 years ago
- examples: Bump tailwindcss from v2 to v3, related #156 #172 #174 #188 #209 #243 — committed to saltyshiomix/nextron by saltyshiomix 2 years ago
@daniboomerang @Dnguye92 @CreedDE
Sorry for late reply.
Just updated tailwindcss examples (bump v2 => v3), and we can finally use
@apply
or any directives 👍postcss.config.js
tailwind.config.js
styles/globals.css
Merged #165 into master 😃
I think the issue has been resolved here https://github.com/saltyshiomix/nextron/pull/165/commits/3398f5fc78a53c722b75e92002a855164112a4dd
Hi @saltyshiomix I can perfectly make work Nextjs with tailwind. The issue is related with Nextjs and Tailwind in the context of electron/nextron
As described, the issue is tailwind custom customization isn’t working in the official examples provided by Nextron https://github.com/saltyshiomix/nextron/tree/master/examples/with-typescript-tailwindcss