This article is also on Medium and en.taishikato.com
Taishi here👋
Today I am going to write about how to implement Dark Mode with Tailwind CSS....
For further actions, you may consider blocking this person and/or reporting abuse
This is fine, just an extra 2 MB of "CSS" code, extra work for the browser, and just making our components dependent on external CSS. In fact, this list should be longer!
You can easily purge the CSS from Tailwind. They have a whole doc section about it: tailwindcss.com/docs/controlling-f...
This approach has a dark side!
How so?
Yes, we can easily purge the CSS 😁
If you set up PostCSS and purge correctly, there won't be any problems with CSS size. You can easily set up inlining critical CSS too to help speed up loading and Lighthouse scores too.
Yeeees👍
Perhaps the most to-the-point tailwind tutorial i've ever seen so far. Great Work!
Thank you for the kind words 😆
maji yabai 🔥 thanks for sharing Taishi
Hey, Fajar!
Thank you for the comment!
Maji Yabai🔥