Sandro Maglione @sandromaglione.bsky.social · 23/12/2024Using @tailwindcss.com for styling? Here are some not-obvious strategies to make your styles more composable (using v4) 🧱 210
Sandro Maglione @sandromaglione.bsky.social · 23/12/2024👉 Inline CSS variables Define dynamic values as local/inline CSS variables, and reference them as a static tailwind classes 100
Sandro Maglione @sandromaglione.bsky.social · 23/12/2024👉 HTML custom data attributes Define states as `data-` attributes, and then reference them easily as tailwind classes Use the new `variant` to clean all up as well 100