livewire-flash icon indicating copy to clipboard operation
livewire-flash copied to clipboard

Dynamic classes not best practice with tailwind

Open willvincent opened this issue 2 years ago • 0 comments

Per tailwind's recommendations, injecting dynamic classes cannot be injected with variables, as the tailwind compiler will have no way to pull those classes in:

Screen Shot 2022-05-18 at 8 35 43 PM

Rather than stuffing a bunch of classes into a config file, it would be better to simply utilize separate templates for the various notification levels/statuses. As it currently exists, styles for the various colors don't get populated by the tailwind compiler unless they've also been used elsewhere not as variables.

Instead, I recommend doing away with the config file entirely, since there isn't any functionality configuration in it, and instead simply make the views publishable so they can be overridden.

willvincent avatar May 19 '22 03:05 willvincent