Why previous may stand as a modern approach?

Well, this website is implementation in Drupal 10 and, thanks to its brilliant architecture and common "parent" packages such as Symfony and Twig, we know that every page, region, title, block, content parts, form, element down to form element label! and similar does or can have own Twig template. In other words, we do have ability to develop on each or any little part of the render markup, amongst the other powerful things we can do there we can also add existing CSS classes, or groups of classes that Tailwind CSS has ready for us. See more about it - Get started with Tailwind CSS.

The result is merely 190 lines of CSS for the whole theme, this includes longer doc blocks and some very usual suspects that need extra handling, as well as some "super classes" aka components definitions. Incredible fact is that we request and load total < 20kb of CSS for this whole website, as seen on the right side of the screenshot! This includes a few additional libraries (see about it in the chapter below) and Tailwind CSS itself is incredible size of < 8kb.

Image
CSS 20kb
/* Theme's complete CSS in 190 lines */