dan’s alt Profile picture
Oct 24, 2021 14 tweets 4 min read Read on X
some thoughts on tailwind after using it for a few weeks on a project. i didn’t personally pick it (i use whatever’s already there) and it was a bit difficult to adjust to at first. however i actually really enjoy it now. here’s what i like/dislike
rampup time: the first week was absolutely brutal. i felt so slow. i couldn’t understand any of the abbreviations and had to always have tailwindcss.com open to look them up. luckily the docs are actually really good, and in a week i memorized the most common ones.
so why do i say i like it? there’s a few things. the more obvious ones:

- enforced consistency: spacing, colors, sizes, nice to have that be in one place.
- low-level: i already have components, don’t need “more involved” framework stuff
- tailwindcss.com/docs/flex taught me flex
the less obvious but more important ones:
(1) i can COPY PASTE markup. this is HUGE. same as classes vs Hooks. people don’t appreciate how powerful it is to be able to just move a bunch of markup/code to another file with NO changes, NO extra imports, NO class renames, etc. this wins over CSS modules or Stylesheet.create
(2) the visual info is colocated with markup. don’t need to open another file (plain CSS) “jump to definition” (StyleSheet.create), or constantly glance up/down (scoped <style>). the info is right there in the tree.
(3) it is very terse. you can have

<div className="... 100 chars ...">

this SEEMS bad at first, but it’s like “styles are collapsed by default”. unlike styled-comps or inline CSS, it prevents the tree from exploding despite colocation. and really long things can be components.
so it feels like inline styles (which i generally enjoy using a lot because i don’t have to come up with names for every little thing), but without spreading my tree too thin vertically, and without the perf cost of inline styles. some guardrails but not in your way. like react
the biggest thing that annoyed me was that whenever i used a new style that hasn’t been used before, i had to restart the dev server for it to work. this was so confusing. i think maybe my setup is messed up and there has to be some way to not have this issue, idk how
overall impression: Weird; Would Use Again, which reminds me of how i feel about react in a nostalgic way.

best part is how you can look at a UI tree and choose to either ignore styles completely (they’re not taking vertical space) or focus on them (and see the exact hierarchy)
another thing that i prefer over styled-components (aside from vertical space) is that the hierarchy feels right. styles are details of my components, not the other way around. i don’t want to name smth and make it a unit just because it has some style. i can breakpoint anything
this is interesting because the commonality between different tw projects means i can jump in now and be fairly productive. cause it’s at a just-slightly higher level than css but not much. can build tooling on top.
there is a subtle point here. people tend to hate on copy pasting styles because it makes global changes harder. but tailwind is intentionally (i think) on the level of abstraction where copypaste doesn’t hurt as much (because rule choices are constrained)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with dan’s alt

dan’s alt Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @dan_abramov

Jul 20, 2023
i feel bittersweet sharing i’m leaving my job at meta in a few weeks. working in the react org at meta has been an honor. i am thankful to my past and present colleagues for taking me in, letting me make mistakes, helping me see my strengths, being kind, and sharing their time.
for the past three years, i kept saying i’d leave “in a year or so” but the moment never felt right. i wanted to (1) finish the new docs and (2) see a broadly usable Suspense data fetching integration shipping. after years of work from the team, both have shipped this spring.
i felt hesitant leaving earlier because not too long ago, leaving meta used to mean leaving the react team. that would feel too sad for me. but it is not true anymore. react has become a multi-company project, and there are several independent engineers on the team too.
Read 15 tweets
Jun 7, 2023
fwiw i expected the article to be clickbait (and the title is) but it’s actually pretty balanced. imo it gets a few things wrong so i’ll provide an alternative perspective (tiny thread)
the framing of “existing features like useState / react-query / CSS-in-JS don’t work” is misleading at best.

to understand why, consider that here is the React you already know… A circle saying React Tree ...
… in the RSC paradigm, all of these things keep working! we are not *replacing* that layer — we are adding a *new* layer that can run at the build or request time. that’s Server Components. the only thing they can do is pass data to the “React you already know”… Same picture as before, but...
Read 9 tweets
Jun 6, 2023
yeah i thought this was nice. idk if “spatial computing” will catch on or will stay as an apple-esque “we’re too good to use the industry terms” thing, but i thought it’s funny that this launch simultaneously validated meta’s bet *and* made meta’s branding feel instantly obsolete
mark’s meta announcement felt corny because they had to come up with a vision of mainstream aesthetics for a medium that has no mainstream community yet. of course it’s not believable! apple stuck with floating 2d stuff in the presentation because it feels familiar.
i think this is great news for meta too. i imagine it will be easier to motivate sweating the details and making them cohesive after apple resets the expectations of what this medium is supposed to feel like.
Read 6 tweets
Jun 5, 2023
lol sorry but i think apple did it again
curious what the actual apple vision (not pro) looks like
vision is such a dope name for a product. focuses it on the human (what function does it serve you) rather than on the place you’re supposedly in (whatever reality). “apple vision” also kinda says “this is *the* thing we’re working on”
Read 7 tweets
May 19, 2023
i mean i sorta get the point but also if a ballpen wrote stuff by itself and contained much of humanity’s collective knowledge within, maybe people would have a point being a bit more concerned about ballpens too? it’s more like a phone line with an alien made out of our voices
which is maybe fine, who knows! the internet is pretty good imo and it sure sounds a lot more dangerous than a ballpen. but like idk it’s just such a freaky vibes piece of technology, both natural and freaky like golems or acid. you don’t see language itself reanimated every day.
the closest positive emotional reference i can think of is something like talking to ancestor spirits. and even those stories typically have preexisting oracles instead of groups of people competing to discover and create them. it’s freaky
Read 4 tweets
Apr 20, 2023
real talk. modern frameworks like Next.js and Gatsby have sort of an “SPA mode”. the main difference is with classical SPAs is that they produce several entry HTML files (per route). this means a purely static (not Node!) deploy needs a tiny URL -> path config. this trips people.
we need to get past this hurdle collectively. it is ridiculous if this is the reason we’re delaying adoption of better tools. SPAs with multiple HTML entry files are much better SPAs! we just need some standard way to deploy these across providers.
ideas welcome. i know there are scripts that generate config eg for nginx and apache. cool. i also know some providers infer these paths by default for next and gatsby. also cool. but can we have one obvious way to do it across the ecosystem? so that every single shop knows how.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(