dwyl / dwyl/phoenix-liveview-counter-tutorial

Dynamic css clasees to color button did not work

Open
#253 1 comment 1 reaction 0 assignees View on GitHub
help wanted question user-feedback
Dominant language
Elixir
Stars
421
Forks
42
Avg merge
2d 4h
Merged PRs (30d)
9

Description

Adding these classes to the safelist in assets/tailwind.config.js makes them work. I could not find another way to get it work.
This is also covered in https://elixirforum.com/t/using-generated-class-names-in-tailwind-under-phoenix-1-7/57995

```
safelist: [
"bg-red-500",
"hover:bg-red-600",
"bg-green-500",
"hover:bg-green-600"
],

```
Version info:
```
phoenix 1.7.20
phoenix_html 4.2.1
phoenix_live_reload 1.5.3
phoenix_live_view 1.0.7
tailwind 0.3.1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.