Took a break from work, so let’s continue the tour where I left off
I notice I should not judge the book by it’s cover, and I don’t. But I do judge the book by Tailwind. This is not fair to the book and the author. So here comes the disclaimer:
The chapters are a great resource of information and explanation.
It’s just Tailwind that kinda bugs me at the moment. So this is the last post before I do a “read everything, review once”. I guess this book isn’t a great fit for a chapter by chapter post.
@apply (…continuation)
Most of this section explains how layers work and why the layers are important so @layers
might have been it’s own section. But that is nitpicking. The book has made clear to me how Tailwind uses the directives and that is what matters. As someone else already mentioned the book does not make clear where to put those which is a miss.
But then the monkey comes out of the sleeve [1]. It is acknowledged that going all wild with
@apply
and@layer
causes you to build your own little framework and taking upon yourself the naming and maintenance. If only I had read this acknowledgement before my mood became sarcastic the other day! I could’ve skipped some pessimism about the@apply
directive. And then it directs me to use components instead of apply. Ow dear, it really is a threadmill!
The book continues with the modifiers
. They were briefly mentioned before and enabled “super power inline styling”. They sure look problem solving: happy to meet .
CSS Units:
Really enjoyed this section! Some historical explanation (about CSS), deeper details and a runner up for Chapter 3: Typography. I would want to write a whole chapter about this to show I can be a very happy person, but then I would spoil it all.
Typography
While reading this chapter I begin to see value in a simple naming scheme, which is said to be offered by Tailwind. A few font schemes are explained and demonstrated. It’s not much over just inline styling but it looks a low cleaner in my code.
But can anyone explain me why it is
font-bold
anditalic
instead offont-italic
? I understand from a CSS mapping point of view but I rather would stay within the ‘namespace’ so the guessing would be easier.
Boxing
Once again the book does it’s job of explaining the available classes, options and modifiers. When needed the examples are demonstrated with graphics which is very nice.
But once again I get struck by Tailwind-ism:
So padding is done with
p{side}-{size}
and border withborder-{side}-{size}
. Mind the dash. Why Tailwind? I really want to like you. And havingmt-auto
has no effect according to the book so why include it in the first place? Would have been nicer to just “do what I want” regardless of the underlying CSS. It’s almost as if they use a CSSproperties-to-Classnames generator sometimes.
The author does mention it in the book which is a pre. This also happens with the bottom-left-top
(mind the {horizontal}-{vertical} instead of the other way around). It is mentioned, but no explanation is given. Not that is matters for those wanting to use Tailwind…but for those pessimistic it would’ve been nice if the Tailwind author could explain his choice here in a sideblock.
I get the feeling the book author shares some criticism with me in this chapter. Although I am in the position to be more vocal about it.
Book conclusion so far
- The book does a great job of explaining everything there is to know about Tailwind and basic (but more than most know) CSS.
- This book targets the developers not knowing much about CSS at all. It therefor explains everything CSS can do, but by using Tailwind class names. Those look less intimidating but I doubt this is the way to go.
- For those having CSS-skills already the amount of explanation of what-does-what is a bit much as most things in the book (so far) are 1-on-1 mapping with a short syntax class name
s-stx-cn
. For those people the currently missing explanations would be nice to have.
[1] As you might have thought, there is no monkey coming out of your sleeve. This Dutch idiom is used when the truth is revealed about a situation or someone.
@blakedietz @Lume @AndyL @bdarla @BigTom @dch @stefanchrobot @victorbjorklund @w0rd-driven
I wonder if you guys already started and maybe have a different experience / opinion than I have!