siestamark

siestamark

Modern CSS with Tailwind: minor formatting suggestions

Congratulations on a fine book on TailwindCSS. I appreciate your very helpful work. It is very timely and nicely done.

In the Utilities section of Chapter 2, you have a callout for “The Leading Dot”. I understand that this is consistent with the concept of a CSS class description. However, as a reader of your text and as a developer using TailwindCSS, I am not defining these TailwindCSS classes, but just using them, which disallows typing their leading dot. It would be less distracting for me if all those dots just went away. Your blue bold lowercase is enough to set these concepts apart for me.

Also, when showing a named optional utility family, I think it would make more logical sense to pull the dash into the curly braces. For example, rather than showing text-{size}-{color}-{level} to indicate a family of text sizes, colors, and levels respectively, it would be easier on my eyes if this were written text{-size}{-color}{-level}, as everything within each {…} would logically go together. If no size were specified, there would be no dash for size; if no color were specified, there would be no dash for color; etc.

Most Liked

noelrappin

noelrappin

Author of Modern Front-End Development for Rails

Thanks for the feedback. I went back and forth on the both of those.

In the second case, I decided to match the way the Tailwind documentation does patterns, it keeps the dashes outside the braces.

The first case, I also thought I was matching the Tailwind documentation, but either they changed the formatting there, or I’m having a memory lapse, because they are not currently consistently using the leading dot to define classes, though they still use it in some places.

Popular Pragmatic Bookshelf topics Top

simonpeter
When I try the command to create a pair of migration files I get an error. user=> (create-migration "guestbook") Execution error (Ill...
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
New
New
Chrichton
Dear Sophie. I tried to do the “Authorization” exercise and have two questions: When trying to plug in an email-service, I found the ...
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
New
taguniversalmachine
It seems the second code snippet is missing the code to set the current_user: current_user: Accounts.get_user_by_session_token(session["...
New
tkhobbes
After some hassle, I was able to finally run bin/setup, now I have started the rails server but I get this error message right when I vis...
New
roadbike
From page 13: On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New

Sub Categories: