TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tailwind CSS v3.0

841 pointsby pspeter3over 3 years ago

72 comments

seanwilsonover 3 years ago
I used the JIT version recently on a new landing page with code completion for class names in my IDE and found it great. The distance between what I&#x27;m picturing in my head and what I have to type to see that on the screen felt so much shorter and less fatiguing than the standard CSS approach.<p>With the regular way, to style something that&#x27;s probably not going to appear elsewhere, I&#x27;m having to: come up with class names, annotate the HTML with them, repeat some of this annotating in a CSS file, jump back and forth between files to tweak the styles, use the web inspector to figure out which CSS class is overriding another then jump to the right CSS file to fix it etc.<p>Tailwind classes are also faster to type and flip between when you&#x27;re experimenting (e.g. editing &quot;mt-5&quot; to &quot;pb-3&quot; vs &quot;margin-top: 4.25em&quot; to &quot;padding-bottom: 2.75em&quot;) and you get less distracted because it has sensible defaults and helpful guardrails (you rarely need all the possible attributes and range of parameter values CSS has available).<p>I also rarely had the super irritating and common CSS scenario where you edit a style and it doesn&#x27;t change and you have to go investigate to find out why e.g. something is overriding something, your selector is wrong, and even after all that maybe you undo the edit because it doesn&#x27;t look good. Plus you no longer have the fear that tweaking a shared class to going to break some completely different page.<p>I feel that beyond some building blocks, trying to create reusable CSS classes with cascading styles has similarities to using excessive abstraction and deep OOP class hierarchies in regular programming languages to avoid a little duplication.<p>I also don&#x27;t have a problem with styling stuff appearing in my HTML files either as long as the right HTML tags are used around the data. HTML files are already full of class annotations and divs that are only there for styling yet this doesn&#x27;t cause a problem to e.g. browsers, screen readers or crawlers.
评论 #29504449 未加载
评论 #29502567 未加载
hiimshortover 3 years ago
I tried Tailwind (and a similar project Windi) on a few projects now and have some findings.<p>Tailwind aggressively speeds up development time of components by allowing me to stay in the same cobtext when styling things. The brevity of class names also dramatically shortens the time spent writing styles. While working on the projects I&#x27;d setup with Tailwind, I felt far more productive.<p>However, those were new projects. After completing them and needing to go back and modify or maintain them, the experience has been horrible. The resulting style declarations (as class names) are completely unreadable and unmaintainable. I&#x27;ve tried organizing them and splitting class names onto multiple lines, but it has only cluttered things.<p>In my experience, Tailwind (and similar projects) produce styles that are effectively read only. They are superb when writing a new component and styling things from scratch, but maintenance is nonexistent.<p>Because of this, I&#x27;ve now switched to using a CSS-in-JS solution to gain the benefits of in-context styling and still have the ability to write CSS declarations in a structured and maintainable way.
评论 #29510321 未加载
评论 #29513090 未加载
评论 #29505793 未加载
评论 #29505473 未加载
评论 #29509215 未加载
评论 #29516107 未加载
评论 #29507000 未加载
stevebmarkover 3 years ago
I&#x27;m not sure I get Tailwind still. Doing everything with utility classes and OOCSS &#x2F; BEM are things we stopped doing literally decades ago. CSS modules still seem to solve every problem Tailwind solves, and better. CSS modules combine the power of global utility classes with locally styled components&#x2F;locally scoped classes, and compile to static stylesheets, a requirement for performance. I&#x27;m not sure how Tailwind works, but any CSS that&#x27;s built at runtime and JS and inserted into the DOM dynamically should be avoided, and is an example of favoring developer experience over end user experience. It&#x27;s always surprising to me when the build process isn&#x27;t front and center of any CSS framework, since that&#x27;s the most important performance aspect. I&#x27;m not concerned about Tailwinds verbose CSS use since that&#x27;s gzipped away, but the static stylesheet compilation aspect worries me if it&#x27;s not front and center of the framework.<p>CSS modules let you use the full power and control of vanilla CSS, without having to worry about styles bleeding across components. Sprinkle in your global utility classes for your design system and you&#x27;re good to go. Or sometimes even better, abstract design into components like `&lt;grid&gt;` `&lt;column&gt;` etc and not even worry about the classname implementation.<p>I know I&#x27;m missing part of the picture, because of the hype and joy that people report from Tailwind. What part(s) am I missing that move folks from the power, beauty, and simplicity of CSS modules, to all-utility-classes-all-the-time Tailwind?
评论 #29502806 未加载
评论 #29502802 未加载
评论 #29503719 未加载
评论 #29503091 未加载
评论 #29502785 未加载
评论 #29502708 未加载
评论 #29502704 未加载
评论 #29504355 未加载
评论 #29502732 未加载
评论 #29504737 未加载
评论 #29503632 未加载
评论 #29503377 未加载
评论 #29505566 未加载
marstallover 3 years ago
just got parachuted into a tailwind project. have to say I don&#x27;t fully get it.<p>the major stumbling block has been how tailwind is mostly just css translated into its own hard-to-memorize lingo.<p>For example, say I want to do something basic like &quot;display:flex; justify-content: start&quot;.<p>In tailwind you would type &quot;flex justify-start&quot; instead.<p>Which doesn&#x27;t really follow any rules as far as how to get from A to B, so it&#x27;s just a matter of having to look the magic word up in their docs each time until you memorize. And there are a <i>lot</i> of keywords (many modifiable according to n-dimensional properties) to memorize.<p>I know there are handy slugs like &quot;w-1&#x2F;3&quot; that encapsulate a best practice - but I&#x27;m a person who&#x27;d rather master the underlying mechanics of that best practice and be able to deploy, tweak and debug it myself.
评论 #29502460 未加载
评论 #29502599 未加载
评论 #29507811 未加载
评论 #29503958 未加载
评论 #29505909 未加载
评论 #29502661 未加载
评论 #29502805 未加载
评论 #29502650 未加载
评论 #29505892 未加载
评论 #29502647 未加载
评论 #29514071 未加载
评论 #29502465 未加载
burlesonaover 3 years ago
I&#x27;m ambivalent about Tailwind, but I&#x27;ve used it a lot. I will say the hypothetical advantages are mostly the following:<p>1. It&#x27;s a step function over CSS units. This is the biggest strength, just standardizing that your design uses padding of 2, 4, 8px, but not 1px, 3px, or 1.23123em :). It provides more steps than you need, but still it&#x27;s good that the core of Tailwind is a design system with defined unit and color variables.<p>2. <i>Some</i> of the utility classes are very helpful. Even as someone who likes writing CSS, it&#x27;s nice to not need to give something a custom classname just because I want to put margin-top on it. class=&quot;mt-4&quot;, done.<p>I think the problem is Tailwind goes too far and tries to replace EVERYTHING with a stack of utility classes.<p>This works okay in extremely componentized web apps. It&#x27;s a nightmare if your UI isn&#x27;t highly componentized. I&#x27;ve seen projects where you make a button by copy pasting this ~80 character string of tailwind classes all over the place, and then changing the color names if you need to. Good luck fixing that when the designer decides that we don&#x27;t want any buttons to have rounded corners anymore.<p>Personally I think the best parts of Tailwind are captured in Pollen[1], but I do wish it came with a subset of utility classes for colors, font sizes, margin, padding, and text alignment. I think the hard part is defining which subset is the right subset... I doubt you could find strong agreement from a large majority of developers on that.<p>1. <a href="https:&#x2F;&#x2F;www.pollen.style" rel="nofollow">https:&#x2F;&#x2F;www.pollen.style</a>
评论 #29503469 未加载
评论 #29509762 未加载
ahallockover 3 years ago
I&#x27;ve been working with CSS for over twenty years, and Tailwind is the way forward for me. Some of the big benefits are:<p>* No more worrying about naming class selectors. This frees up so much cognitive space. The less you have to worry about naming the better. I used the SUIT CSS naming convention before, which allows a mix, and that just creates friction. You need the same level of abstraction all the way through.<p>* No more flipping between files. You edit your styles directly in the HTML. You will need to consult the TW docs, of course, but they&#x27;re easy to navigate.<p>* Tailwind is more than just inline styles. It provides a nice syntax for targeting breakpoints and little utilities for conveying more abstract styles&#x2F;stacking rules.<p>* TailwindUI is a great way to jumpstart a project and looks way better (IMO) than Bootstrap&#x27;s components.<p>* JIT is awesome<p>I&#x27;d be remiss if I didn&#x27;t mention some cons:<p>* Looking at a bunch of class names in your HTML is at overwhelming at first. It&#x27;s hard to delineate the structure. Using proper HTML elements, roles, etc. helps.<p>* You will need to DRY up your repetitive styles by moving things to templates&#x2F;components. So you still have to name things, but just keep it generic (alert, dropdown, badge, etc)<p>* Sometimes you&#x27;ll have to create class selectors when working with web frameworks and JS libs that require a single class selector option.
评论 #29507153 未加载
Mizzaover 3 years ago
I&#x27;ve been a Bootstrap user for a long time, but I recently made the jump to Tailwind. It&#x27;s not the revolutionary upgrade I was hoping for, but it&#x27;s nice evolutionary step in the right direction. It&#x27;s quite intuitive, but it doesn&#x27;t get rid of most of the frustrations that come from doing layouts, as those come from the design of CSS itself. `@apply` makes the upgrade worth it though, it&#x27;s easy to make custom classes from the Tailwind elements.<p>The one thing I don&#x27;t like is that the culture around Tailwind seems a lot more proprietary, like you&#x27;re getting three quarters of a product that you need to buy the rest of, whereas Bootstrap felt like you got everything you could ever need for free.
评论 #29502406 未加载
评论 #29504299 未加载
评论 #29504731 未加载
rekorosover 3 years ago
Tailwind made it possible for me (backend developer) to write somewhat maintainable frontend code. It’s a joy to use both as a writer and reader.
评论 #29502514 未加载
评论 #29502044 未加载
ggregoireover 3 years ago
As always when anything about Tailwind gets posted on HN… 200 comments so far and (almost) not a single one about the actual blog post.<p>Looking at the new features, I wondered why they went with a major version bump, but seems like it&#x27;s because the Just-in-Time engine released in Mars as a feature flag is now the default engine, which is a pretty big change by itself.
评论 #29509397 未加载
rgbrgbover 3 years ago
Tailwind always looks like a cool evolution of Tachyons [0] to me (with a build step). On the other hand, tachyons is really simple, you just drop it into your project with no build required (or drop the sass in), and I&#x27;ve never really felt like it was missing any features I wanted.<p>Has anyone used both seriously who can compare?<p>[0]: <a href="https:&#x2F;&#x2F;tachyons.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tachyons.io&#x2F;</a>
评论 #29502266 未加载
评论 #29502339 未加载
评论 #29502362 未加载
评论 #29502273 未加载
bschneover 3 years ago
For those wondering &quot;but separation of concerns!&quot; or &quot;but code reuse!&quot;, the dev behind Tailwind wrote a post about his thinking around this, which IMO makes quite a lot of sense, a while back:<p><a href="https:&#x2F;&#x2F;adamwathan.me&#x2F;css-utility-classes-and-separation-of-concerns&#x2F;" rel="nofollow">https:&#x2F;&#x2F;adamwathan.me&#x2F;css-utility-classes-and-separation-of-...</a>
评论 #29509945 未加载
yasserkaddourover 3 years ago
I love Tailwind! It elegantly solves most pain points in writing CSS. However, it does this at the cost of readability, and you can easily end up with HTML that looks like this:<p><pre><code> &lt;div class=&quot;w-16 h-16 px-2 py-1 m-1 text-sm text-white bg-black rounded md:w-32 md:h-32 md:rounded-md md:text-base lg:w-48 lg:h-48 lg:rounded-lg lg:text-lg focus:bg-red-400 focus:rounded-md hover:bg-yellow-200 hover:rounded-t-md md:focus:rounded-xl md:focus:text-lg lg:focus:rounded-xl lg:focus:text-xl md:hover:rounded-xl lg:hover:rounded-xl&quot;&gt;Yikes!&lt;&#x2F;div&gt; </code></pre> I would love to have a transpiler that produces the line above from a code like this:<p><pre><code> &lt;div class=&quot;w-16 h-16 px-2 py-1 m-1 text-sm text-white bg-black rounded&quot; md=&quot;w-32 h-32 rounded-md text-base hover:rounded-xl&quot; md-focus=&quot;rounded-xl text-lg&quot; lg=&quot;w-48 h-48 rounded-lg text-lg hover:rounded-xl&quot; lg-focus=&quot;rounded-xl text-xl&quot; focus=&quot;bg-red-400 rounded-md&quot; hover=&quot;bg-yellow-200 rounded-t-md&quot;&gt;Yeah!&lt;&#x2F;div&gt;</code></pre>
评论 #29505242 未加载
评论 #29505466 未加载
评论 #29505354 未加载
etchalonover 3 years ago
I’ve never understood CSS frameworks. CSS is the most lightweight thing I touch in the front end.<p>It’s predictable, there are a billion ways to accomplish things, and it’s super easy to namespace yourself to safety.<p>SASS I understand. It makes writing CSS faster.<p>Tailwind feels like you have to learn CSS, but you’ll never have to actually write CSS.<p>Reminds me of CoffeeScript in that way. You always had to understand both It and JavaScript.
评论 #29513987 未加载
评论 #29503232 未加载
savanalyover 3 years ago
For those that don&#x27;t know, the laundry list of new stuff is probably all enabled by the first item in the list, just-in-time compilation. This means anything they can dream up can be included as a utility class, without bloating the compile time of the 99% of projects that will never use the feature (also without bloating the css package size, but that&#x27;s not new since shaking out dead classes for prod has been a thing since forever).
gunshowmoover 3 years ago
Looks fantastic. My only concern using this in a full React project is its lack of interoperability with standard libraries. It seems like for the best experience, you either buy Tailwind UI to use with a tailwind project for anything except the most basic UIs, reimplement the Tailwind UI components yourself, or have a weird mix of css-in-js and Tailwind CSS. Although I love the idea of HTML-native inputs all the way through, I tend to immediately run into issues where using a native interface instead of a JS-based implementation harms the user experience.<p>Props to the team though - I feel like this is something I&#x27;ll try out for a marketing site.
评论 #29502167 未加载
评论 #29501752 未加载
评论 #29501852 未加载
评论 #29501804 未加载
peterkellyover 3 years ago
I&#x27;ve never used Tailwind CSS. I watched the video &quot;Just-In-Time: The Next Generation of Tailwind CSS&quot; and all of it seems like they&#x27;re solving problems that are entirely of their own creation, and doing so in an impressively complex way.<p>The use case demonstrated was suppose you have a twitter button on your site, and it has to have a background color of #1da1f2 because that is Twitter&#x27;s brand color. Instead of writing style=&quot;background-color: #1da1f2&quot; like a normal person they have a class name called bg-[#1da1f2], and their &quot;JIT compiler&quot; generates a named class with that property.<p>In another part of the video, they use className=&quot;font-bold&quot; instead of style=&quot;font-weight: bold&quot;. Apparently the advancement in this version is that instead of having all of those pre-defined classes they only generate the ones you actually use. The feature list for 3.0 includes the ability to use any color you want, and even arbitrary CSS properties that the framework doesn&#x27;t explicitly know about.<p>Is this progress? I could use the style attribute in 1999.
评论 #29506603 未加载
评论 #29506671 未加载
评论 #29507903 未加载
评论 #29506963 未加载
评论 #29506856 未加载
评论 #29506730 未加载
评论 #29507122 未加载
评论 #29506839 未加载
kumarvvrover 3 years ago
<i>By far</i> Tailwind has been <i>the</i> fastest way for me to prototype UI.<p>I am a developer nerd and have a good taste for design. However, during actual development, I do not have the ability to visualize what I want in the <i>first attempt</i>.<p>So, I have to tweak the look and bring out the beauty I want through a 1000 cuts. TW makes that process extremely easy. Like, mindbogglingly easy.<p>However, I have learnt to be careful with my code, and I often limit the styles by splitting them off into sub-components.
keewee7over 3 years ago
The thing that made Bootstrap click for me years ago as a backend developer were these complete example layouts:<p><a href="https:&#x2F;&#x2F;getbootstrap.com&#x2F;docs&#x2F;5.1&#x2F;examples&#x2F;" rel="nofollow">https:&#x2F;&#x2F;getbootstrap.com&#x2F;docs&#x2F;5.1&#x2F;examples&#x2F;</a><p>Is there anything similar for Tailwind CSS?
评论 #29502836 未加载
评论 #29502194 未加载
评论 #29502186 未加载
评论 #29503555 未加载
1_playerover 3 years ago
Before you ask, as it happens in every Tailwind post, what is the point of this when CSS &quot;promotes&quot; reuse and separation of concerns, have a look at @ 5e92cb50239222b comment: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29501650" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29501650</a><p>And let me repeat what every Tailwind fanboy (like me) states every time this project is on HN: don&#x27;t knock it till you&#x27;ve tried it. Look at the animated example in the front page. You&#x27;ll never be able to iterate that quickly with CSS.
评论 #29502563 未加载
评论 #29503745 未加载
评论 #29502445 未加载
评论 #29502502 未加载
评论 #29502915 未加载
评论 #29501972 未加载
评论 #29501831 未加载
lewantmontrealover 3 years ago
Has there ever been a front-end library&#x2F;product so polished? The landing page and even this announcement and the video is just wow.
评论 #29502424 未加载
Yaboodover 3 years ago
We&#x27;ve been using Tailwind for over a year now. We use it with Angular for our web application and with Gatsbyjs&#x2F;React for our production website. I have nothing but love for Tailwind.
aejover 3 years ago
Tailwind feels like the correct abstraction on-top-of css which works for 90% of use-cases.<p>I struggled with css for many years but Tailwind has actually helped me improve my css - when I&#x27;m forced to write plain old css, my mental model of how everything works is much better. The fact that Tailwind has become so popular is a smell that css is slightly too low-level for most developers.
commanderkeen08over 3 years ago
Every time Tailwind does something great and gets posted here, the conversation devolves into the same arguments: “I don’t get it. It’s just inline styles.”<p>What is it about CSS that gets people so offended and opinionated? If it were a new JS framework, few people would be saying “I just don’t get XYZ. Use React”. Is it because Tailwind is so drastically different and breaks people’s core ideas about separation of concerns? Maybe it’s because we all learned CSS very early and were told to do it XYZ and now challenging that is painful.<p>If you honestly want to “get” Tailwind, go use it in a project. If you don’t like it, don’t use it. Nobody is going to change your mind in a comment and you’ll never convince anyone to stop using it.<p>Idk. CSS is what I least care about. It’s a thing. I use it to do a thing. And I move on. I used SASS. Now I don’t.
评论 #29505398 未加载
评论 #29506494 未加载
评论 #29504962 未加载
评论 #29504741 未加载
awestrokeover 3 years ago
Since I learned to write semantic class names, and to compose using scss or react components, Tailwind feels like it would be a big step back. I get that it would be kind of nice to prototype in, but is anybody here using it for complex apps or UIs?
评论 #29501650 未加载
评论 #29501931 未加载
评论 #29501686 未加载
评论 #29501749 未加载
评论 #29501657 未加载
评论 #29501725 未加载
评论 #29501984 未加载
joshlemerover 3 years ago
I took a stab at using Tailwind a while back but I&#x27;m embarrassed to admit it didn&#x27;t make much sense to me as someone with only the most basic CSS skills. And for some reason CSS to me has been something really hard to get any kind of foothold in and I&#x27;ve always ended up just resorting to big UI component libraries like Bootstrap. Any recommendations on skilling up in CSS for your average back end dev? Manning&#x27;s &quot;CSS In Depth&quot; maybe <a href="https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;css-in-depth" rel="nofollow">https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;css-in-depth</a>
chrysopraceover 3 years ago
I&#x27;ve always been a bit apprehensive of Tailwind but with the latest JIT compiler it actually seems usable. I&#x27;m happy to see it getting more use for mainstream applications but I wish it wasn&#x27;t the &quot;default&quot; for a lot of open source projects.<p>For example, several of the next.js examples[1] use tailwind without explicitly stating so, because I guess it&#x27;s just become a ubiquitous as css stylesheets or modules for some people. The problem I find is that it adds opinion and mental overhead for people learning related technologies or trying to get a head start without an opinionated styling solution. In order to use something like the blog-starter example for next.js I have to go and learn tailwind and then come back before I can use their blog starter, where as CSS is universal. CSS works with every project, without depending on Tailwind.<p>Anyway, looking forward to seeing newer improvements to Tailwind, but I hope that people will consider it an alternative to something like Bootstrap instead of an alternative to CSS.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;vercel&#x2F;next.js&#x2F;tree&#x2F;canary&#x2F;examples&#x2F;blog-starter" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vercel&#x2F;next.js&#x2F;tree&#x2F;canary&#x2F;examples&#x2F;blog-...</a>
评论 #29504916 未加载
brightballover 3 years ago
I’m so grateful that Tailwind has removed any analysis paralysis that I’ve had in the past on which CSS framework to invest my time in learning.
manishsharanover 3 years ago
I used to use Zurb Foundation or Bootstrap for my personal projects but I found these two frameworks required me to use their javascript and their JS does not play nice always. So I moved to Bulma and that has served me well so far. I like not having to worry about CSS (it drives me nuts) and I would like to just focus on building components and functionality.<p>Is TailwindUI an alternate to Bulma ?
评论 #29502210 未加载
评论 #29502024 未加载
asimpletuneover 3 years ago
Is there a link showing the delta between v2 and v3?
评论 #29501659 未加载
评论 #29501581 未加载
jerrygoyalover 3 years ago
TIL about css columns (a replacement of flex if you&#x27;re not building responsive design) <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;columns" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;columns</a>
评论 #29502957 未加载
评论 #29503259 未加载
ablekhover 3 years ago
If you would decide or have to use Vue for a complex project today, would you use Tailwind with Vue? If yes, why? If no, why not? Would your answer and rationale change in cases, when you decide or have to use a Web application framework like Nuxt or a UI component library like Vuetify and PrimeVue?
AltruisticGapHNover 3 years ago
I love Tailwind but now with these updates I&#x27;m like &quot;ok whatever&quot;. Information overload.<p>There is a point where there are so many utilities; it&#x27;s just not reasonable to ask me to remember them... and at that point where I can&#x27;t keep them in my mind, then the &quot;framework&quot; loses some of its appeal and benefits.<p>Of course I suppose it&#x27;s up to the user to decide what they want to remember, and it is the nature of the framework to become exhaustive.<p>I don&#x27;t really have an answer to this. Only that it further reinforces how TW is a tool, among others, and as it becomes more and more complex it can no longer become a &quot;holy grail&quot; sort of approach precisely because you lose the benefits of having &quot;rails&quot;.
评论 #29511247 未加载
gedyover 3 years ago
I really like Tailwind, and was excited to use it for a new application at our company. However, I find the lack of standard component classes (modal, card, button, wherever) pretty limiting.<p>This makes it difficult to have open source Tailwind components that can be imported and themed differently for your apps. Even after buying Tailwind UI, they are basically just code samples that we&#x27;d have to copy into our own libraries and maintain.<p>Again it&#x27;s a really cool library, but feel the approach is probably better for smaller apps and teams.<p>Daisy UI might help with this, but seems pretty small at the moment. <a href="https:&#x2F;&#x2F;daisyui.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;daisyui.com&#x2F;</a>
评论 #29503129 未加载
___qover 3 years ago
Arbitrary Properties (inline styles) can now use constraints (css vars), media queries, and hover&#x2F;focus states, the reasons Tailwind said you should use their utility classes instead of inline styles in the first place :)<p><a href="https:&#x2F;&#x2F;tailwindcss.com&#x2F;docs&#x2F;utility-first#why-not-just-use-inline-styles" rel="nofollow">https:&#x2F;&#x2F;tailwindcss.com&#x2F;docs&#x2F;utility-first#why-not-just-use-...</a><p><a href="https:&#x2F;&#x2F;tailwindcss.com&#x2F;docs&#x2F;adding-custom-styles#arbitrary-properties" rel="nofollow">https:&#x2F;&#x2F;tailwindcss.com&#x2F;docs&#x2F;adding-custom-styles#arbitrary-...</a>
mcgingrasover 3 years ago
I don&#x27;t have the energy to explain to the naysayers why I love tailwind so much but I do have the energy to log back into HN just to comment that I absolutely love tailwind. Give it a try and maybe it&#x27;ll stick!
nickjjover 3 years ago
If anyone is interested I just updated a bunch of my example Docker apps to use TailwindCSS v3. That includes examples for Flask, Django, Phoenix, Rails, Node and Play.<p>Here&#x27;s a link to the repos: <a href="https:&#x2F;&#x2F;github.com&#x2F;nickjj?tab=repositories&amp;q=docker-*-example" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nickjj?tab=repositories&amp;q=docker-*-exampl...</a><p>It took longer to rebuild the Docker images than making the v2 to v3 Tailwind specific changes. In my case it came down to deleting and renaming a single property in my Tailwind config file.
drusepthover 3 years ago
I finally got into Tailwind a few months ago after originally HATING the paradigm shift, but it&#x27;s started to grow on me -- especially since most of the modern &quot;material design&quot; CSS libraries are starting to show their age and Tailwind fills a similar throw-together-something-beautiful-fast niche.<p>This comes at particularly nice timing with Rails 7 releasing at the end of the month. I can&#x27;t wait to pair the two and see how well the new features of each work together.
laaczover 3 years ago
I am the one who always has had issues with TailwindCSS. But now I know why. It&#x27;s not because it&#x27;s polluting HTML. It&#x27;s because I am not one of those, who can whip up some cute buttons on the fly. I have no idea how to apply padding, chose fonts, colors or combine shadows. I&#x27;m better off with CSS frameworks which provide me with these things out of the box. TailwindCSS ir just a method for rapid designing, which I am totally incapable of.
zackbloomover 3 years ago
Having used it pre-release, the JIT compiler is really incredible. It makes Tailwind a sea-change when compared to Bootstrap and the other, similar, CSS toolkits.
gjvcover 3 years ago
I want something like this which includes a few ExtJS-like grid (as in data table) and treelist classes for &quot;enterprise&quot; CRUD want-to-be-spreadsheets-when-they-grow-up apps. (point being, everything in a single toolkit)<p>So much of enterprise IT is little more than glorified form fill-in, and yet so few CSS&#x2F;JS libraries solidly cover these use cases.
bamboozledover 3 years ago
Coming from someone who mostly does platform &#x2F; service work and usually avoids &quot;the frontend&quot;, tailwind helped me to actually understand CSS, it made sense to me and has saved me a lot of time. The site I built looked professional very quickly and without much effort.<p>Thank you to the team and I look forward to using it more in the future.
yurishimoover 3 years ago
Really happy to see this before the end of the year. The JIT improvements and comprehensive arbitrary value support will no doubt come in handy for quick one-off projects or bespoke landing pages.<p>I&#x27;m happy they have also expounded upon some of the more common FAQs on the homepage, including the extraction to components.
hsbauauvhabzbover 3 years ago
I like the idea of tailwind, I’ve dealt with raw css and bootstrap before but I’m certainly no frontend developer.<p>How can I learn tailwind enough to become proficient? Most of the documentation I looked at seemed to lack any tutorial on how to locate the correct classes I need, or any other sharp edges that might exist,
评论 #29503930 未加载
arjunbajajover 3 years ago
If you want to jump into learning and using Tailwind quickly, I highly recommend their official playlist:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL5f_mz_zU5eXWYDXHUDOLBE0scnuJofO0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PL5f_mz_zU5eXWYDXHUDOL...</a><p>It helped me a lot!
Accacinover 3 years ago
I tried Tailwind not long ago and really liked it, but setting it up with Create React App seemed a bit of a hassle as I couldn&#x27;t do it without replacing the build, run, and watch scripts with something else I&#x27;d forgot the name of.
alberthover 3 years ago
I inherently from a coworker who was terminated, a web app built with Tailwind.<p>The tailwind.config.js is missing.<p>I can’t even begin to describe all of the reverse engineering I’ve tried to regenerate the config file with no luck and we’re royally screwed.<p>Make sure you don’t lose that file!
评论 #29503867 未加载
评论 #29503860 未加载
edwnjover 3 years ago
lol Its funny how this thread just turned into a review of tailwind.<p>IMO Tailwind is awesome (and cant wait to try out v3). It took me a second to warm up to it but now it makes so much sense.<p>You deal with a lot of minutia writing your own classes and since css is designed to be put in classes, it looks ugly when you add it to elements.<p>Minifying the styles into structured classes makes life so much easier. Once you map out like 5% of the lingo, you can instantly play with it like lego blocks.<p>I literally get the same feeling I had when I was first messing around with frontend. That feeling of power&#x2F;possibilities&#x2F;excitement when you can tweak a few words and shit changes on the screen.
trungdq88over 3 years ago
Last time I tried the jit or purge mode, some classes were missing randomly each build and broke my site. (I followed their purge rules very carefully).<p>The worst thing is it ONLY happens on the production build.<p>I like Tailwind CSS and I really hope they make it stable.
评论 #29505545 未加载
weakwireover 3 years ago
Great! but the docs are on the offensive side: - &quot;Yes, send me all your stupid updates&quot; - &quot;The new print modifier lets you style how your site should look when <i>animals</i>(in strikethrough) people print it.&quot;
评论 #29502010 未加载
评论 #29502087 未加载
mythzover 3 years ago
Tailwind has to have the gold standard of library docs - impeccably well thought out with the fastest &amp; relevant quick search UX.<p>The invaluable utility of which ultimately convinced us to implement real-time search into our docs as well.
yewenjieover 3 years ago
Seems surprising that no one has mentioned UnoCSS - the big umbrella of atomic CSS frameworks yet.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;antfu&#x2F;unocss" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;antfu&#x2F;unocss</a>
travisdover 3 years ago
I wonder what the future of code-splitting with Tailwind will be. With JIT and a large web app, it&#x27;s easy to ship a massive CSS file even if 90% of the rules are unused on 90% of the pages.
评论 #29503769 未加载
评论 #29502408 未加载
dorianmariefrover 3 years ago
And the usual release video:<p>What&#x27;s new in Tailwind CSS v3.0?<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=mSC6GwizOag" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=mSC6GwizOag</a>
cuddlecakeover 3 years ago
&gt; Modern aspect ratio API — no more padding hacks, well unless you need to support Safari 14, which you probably do, but still.<p>This is what makes me cry at night.
aruanavekarover 3 years ago
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gg43E_AOQko" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gg43E_AOQko</a>
rasulkireevover 3 years ago
Obviously this is not a solution for everyone, but tailwindui solves all my problems. From that point all the updates are suuuuper quick to make.
ipaddrover 3 years ago
I just started using tailwinds. I found the daisyui plug-in to simplify the classes required and they add in the missing components.
fadikhadraover 3 years ago
Congrats on the release, keep up the great work!
droptablemainover 3 years ago
Any general advice for incorporating Tailwind into a massive legacy project with awful CSS architecture?
评论 #29508984 未加载
nauticacomover 3 years ago
I find it funny whenever Tailwind people tout that you &quot;don&#x27;t have to name things.&quot; You still have to name your JS-framework-of-choice components, <i>and</i> you still have names for each of the parts of a single component that get smattered with class names; it&#x27;s just that the name is implicit in your head now instead of explicit in the CSS
5cott0over 3 years ago
Been a fan since V1 and to this day all I ever use are @apply and utility classes.
d--bover 3 years ago
Geez, every time I see stuff from Tailwind I get so jealous…<p>Tailwind is fine, but how they pulled off making tons of people pay for a css framework just blows my mind.<p>I remember reading the “UI for developers” articles, and saw how they built up the hype. This was so well done…
评论 #29514976 未加载
jlelseover 3 years ago
Is it possible to use the JIT feature with Golang template files?
评论 #29503665 未加载
nfRfqX5nover 3 years ago
congrats to the team, they’ve been moving at a solid pace while keeping the quality high. funny that this also continues to be one of the most controversial topics on HN
loegover 3 years ago
(Formerly: dupe of <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29501125" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29501125</a> . The comments have now been merged.)
评论 #29501717 未加载
Ataraxyover 3 years ago
The waterfall columns layout is really nice.
tomcooksover 3 years ago
Why have very spurious html, intertwined with the presentation layer?<p>Are you going to update all your HTML in a year when a fresh new hip library lands on your HN homepage?
brainzapover 3 years ago
How do I make a button? I am too dumb to get the simple button working.
评论 #29502463 未加载
评论 #29502602 未加载
iovrthoughtthisover 3 years ago
you know its good when so many people hate it
danbruderover 3 years ago
we love to see it
acro5pianoover 3 years ago
I love it
plesivover 3 years ago
With no disrespect to anyone, I think it&#x27;d be useful if people bashing Tailwind would briefly list what their day to day programming consists of.<p>My impression is that most of the negative comments are coming from people that don&#x27;t code for Web often (I could be wrong). To those folks: I&#x27;m not saying you don&#x27;t know your stuff or that you argue badly - since I was on that side myself a few months back.<p>What I am saying is that the elegance and pragmatism of Tailwind might not be easy to intuit just by reading about it. Try to implement a simple landing page using Tailwind+TailwindUI and see if any lightbulbs gets lit.
评论 #29504413 未加载
评论 #29504486 未加载