3 ms·
I second this! I have gone full circle myself. From Dreamweaver (have to start somewhere), hand coding, Bootstrap classes and modifying them, then naturally sta
by bigbassroller 6y ago
I second this! I have gone full circle myself. From Dreamweaver (have to start somewhere), hand coding, Bootstrap classes and modifying them, then naturally started using utility classes. Finally made the switch to Tailwind (felt like cheating on a lover, because I loved Bootstrap so much). I then went full on utility classes and low and behold, discovered @apply with nested @screen media queries and went right back to writing clean HTML with named CSS classes that use utility classes in a SCSS file. Its so cool to me, I want to tell everyone about it.
- bigbassroller 6y agoPS: Plus postcss purge. CSS ecosystem is complete!
- irrational 6y ago> Plus postcss purge What does this mean?
- theIV 6y agoI believe they're referring to https://github.com/FullHuman/purgecss https://github.com/FullHuman/purgecss.
- __abc 6y agoPlease, tell me more :)
- bigbassroller 6y agoHere is an example off the top of my head, while on iphone: .card { @apply flex flex-row shadow rounded-md p-4; @screen md { @apply flex-col p-6; } yada... yada... } then in tailwind config, point the purge path to your html file(s) to purge. End result is css file with no more and no less than what you need, and in the web inspector you see clean HTML markup and clean CSS declarations. edit: typo