Closed cohawk closed 2 years ago
FYI boilerplate compiles now after updating deps {:petal_components, "~> 0.9.0"}
& tailwind elixir & alpine versions in commit https://github.com/petalframework/petal_boilerplate/commit/a11158271d333a1793fe202c9cfd8f8c5c7a498b
pulling in AlpineJS via CDN is not my preferred, but it does remove need for node_modules. Remember if adding AlpineJS via a module will need to update config/config.exs
config :esbuild,
--target=es2016
to `es2017'+ as reported https://github.com/phoenixframework/phoenix/issues/4579#issuecomment-963955963
still need to update mix.exs to remove "cmd --cd assets npm install"
from mix setup
- or update README instructions, since moving to https://github.com/phoenixframework/tailwind
and removing need for npm / node_modules
lastly the dark mode does not appear to currently work unless I added <body class="dark:bg-gray-900">
to layout/root.html.heex
thanks for providing the boilerplate BTW
Sorry for the slow reply. Thanks @cohawk I pushed up the es2017 target and fixed mix setup
.
Currently if your OS is in dark mode and you add dark:something to your codebase then it'll apply instantly. Otherwise if you're in light mode and want to test dark mode you will need to change tailwind.config.js
:
module.exports = {
darkMode: 'class',
// ...
}
And then add the class "dark" to your body element. Although dark mode for petal_components is still a WIP for the moment - not all components will work with it - should be done soon.
No worries @mplatts. I kinda felt bad for polluting your zero issues tracker for my weekend PETAL prototype with something you updated 10 hours later with the standalone tailwindcss phoenix installer.
Thanks for the dark mode explain - Im still learning my way around tailwind and since I found your petal_components have been referencing it nonstop.
Na don't feel bad - I'd prefer the feedback over zero issues! I'm pretty new to open source so it's handy having other people chip in and give feedback/guidance.
Glad you're getting into Tailwind - I think it's great.
Fresh template install currently gives a compilation error when using the .card Petal component
Fixed updating mix.deps
FYI also seems to be a CSS error with all the .card dark @layer components, but might be something I missed on setup