DEV Community

loading...

Discussion on: Moving From Tailwind To Vanilla-er CSS

Collapse
owenmelbz profile image
Owen Melbourne

Do you think you'd be up for revising the "Preflight" and "Javascript Dependencies" points to something potentially more (excuse the term) "accurate" ?

Preflight - this is completely optional, just don't include the directive for it - in fact you can add normalize if you like? Maybe just a revision to say you can disable or replace it if you want.

Javascript dependencies - If you want to avoid adding TW to your build chain, simply use the official CLI tool which lets you build on the fly without touching the rest of your code base. From memory it's a simple as "npx @tailwindcss/cli build" (plus some extra args)

I appreciate these are things that have caught you out, but they're not faults of Tailwind, they're caused by how it's been used. If you drive a car into a river and complain it sank - it's not the cars fault :P

Collapse
terabytetiger profile image
Tyler V. (he/him)

Preflight - this is completely optional, just don't include the directive for it

While this is true, I don't think it's particularly relevant to the author's point - which is that when you follow the Installation page's instructions, you end up with fully reset styles and it can be jarring to new users.


Javascript dependencies - If you want to avoid adding TW to your build chain, simply use the official CLI tool which lets you build on the fly without touching the rest of your code base.

The first line of the installation page which discusses this option is:

For simple projects or just giving Tailwind a spin [...]

and under the "Using Tailwind via CDN" section there's this statement:

To get the most out of Tailwind, you really should install it as a PostCSS plugin.


Everything the author has run into that you're calling out is from following the recommended installation guide in the Tailwind docs and will align with the experience of many new users.

Collapse
owenmelbz profile image
Owen Melbourne

Not really interested in any excuses tbf - The fact of the matter is sharing false information.

If people with less experience read that - they will repeat and take it for truth.

If a balanced argument is provided, they will be educated with both sides.