Comments (4)
Yeah, this is standard Tailwind policy. Can't use interpolation.
from tailwindcss-rails.
I'm not sure about this. This is also the issue on the TW purger (PurgeCSS). Tailwind official docs recommend to avoid these kind of dynamic classes.
Your refactor example seems more reasonable when we look at the tailwind philosophy, you can also create custom classes such as btn btn--primary
from tailwindcss-rails.
Thanks for the feedback!
from tailwindcss-rails.
For anyone who might stumble onto this issue, I created a gem that helps out with this: https://github.com/d3d1rty/utility_classes
from tailwindcss-rails.
Related Issues (20)
- tailwindcss:watch terminates with exception HOT 10
- uninitialized constant Tailwindcss (NameError) when launching puma HOT 16
- Watcher not working in Docker even with `tty:true` HOT 2
- How do I get the color palette from the tailwind docs to work? HOT 1
- Allow to choose between Procfile.dev or Puma plugin
- Classes not loaded while building
- TailwindCSS does not support react-on-rails with scss HOT 1
- Run bin/dev, but it failed to install foreman HOT 5
- Not working on x86 architecture
- Rails underscore escaping issues HOT 2
- Tailwind scaffold template is out of sync with rails/rails ERB scaffold template HOT 2
- May be time to remove @tailwindcss/aspect-ratio HOT 4
- Debugger hangs when I use the watcher as plugin! HOT 2
- bin/dev doesn't work for me. HOT 3
- Automate gem build and deployment with github actions HOT 2
- Investigate failing CI build
- Use of gem without sprockets (eg vite) aka standalone use of tailwind generators HOT 1
- Installing Tailwind into an existing project HOT 2
- Form Helpers & Tailwind
- "rebuild" speed is extremely slow when using safelist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwindcss-rails.