Open trey opened 1 year ago
@layer
theme
@apply
Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project | CSS-Tricks
https://twitter.com/adamwathan/status/1559250404977917954
The theme function is much simpler, much more predictable, and adds that tiny bit of necessary friction to make you ask yourself: Am I extracting this because I need to or because I want to make things “cleaner”?
The theme function is much simpler, much more predictable, and adds that tiny bit of necessary friction to make you ask yourself:
Am I extracting this because I need to or because I want to make things “cleaner”?
https://tailwindcss.com/docs/functions-and-directives#theme
https://twitter.com/leeerob/status/1590871034382946304
TIL that @tailwindcss can automatically strip hover styles for mobile devices. No more desktop styles affecting taps!
@tailwindcss
// tailwind.config.js module.exports = { future: { hoverOnlyWhenSupported: true, }, // ... }
@layer
stheme
instead of@apply
1.
Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project | CSS-Tricks
2.
https://twitter.com/adamwathan/status/1559250404977917954
https://tailwindcss.com/docs/functions-and-directives#theme
3.
https://twitter.com/leeerob/status/1590871034382946304