Readit News logoReadit News
adamwathan commented on Infinite Pixels   meyerweb.com/eric/thought... · Posted by u/OuterVale
calibas · a month ago
What's the actual use case for "infinity" in CSS?
adamwathan · a month ago
We use it in Tailwind CSS v4 for pill-shaped borders:

  .rounded-full {
    border-radius: calc(1px * infinity);
  }
...as opposed to what everyone has done historically, which is pick some arbitrary huge value like:

  .rounded-full {
    border-radius: 9999px;
  }
No real practical benefit, just satisfyingly more "correct".

adamwathan commented on Vanilla JavaScript support for Tailwind Plus   tailwindcss.com/blog/vani... · Posted by u/ulrischa
bikeshaving · 2 months ago
This is a exciting use-case for custom elements, and probably how tailwind should have been implemented from the start, but it’s hilariously a paid feature?! (https://tailwindcss.com/plus#pricing) Intuitively, I’d expect the custom elements to be free and the framework integrations to cost money.
adamwathan · 2 months ago
Thanks! It's a paid feature because we just spent around $250,000 developing the library. Couldn't have built it if we were just going to give it away and maintain it forever for free, our engineers are talented people and deservingly well-paid.
adamwathan commented on Vanilla JavaScript support for Tailwind Plus   tailwindcss.com/blog/vani... · Posted by u/ulrischa
_betty_ · 2 months ago
interesting, i had just watched Primeagens Standup with Adam and got the impression they don't do well for money, but a quick google came up with a bunch of posts from Adam himself disclosing some fairly impressive numbers.

No idea if he still does ok from it, but he certainly did at one stage.

adamwathan · 2 months ago
We are still healthy and profitable but revenue is down about 60% from peak, and continuing to trend down (I think mostly due to AI and open-source alternatives to the things we've historically charged for.)

So things are fine but we do need to reverse the trend which is why we are pretty focused on the commercial side of things right now.

We started a corporate sponsors/partner program recently, and I'm hoping that will earn us enough funding to focus more on the free/open-source stuff, since that's where we create the most value for the world anyways. Fingers crossed!

adamwathan commented on Ask HN: Who is hiring? (April 2024)    · Posted by u/whoishiring
pschuegr · a year ago
The job postings say European time zones only, but this says Americas as well, can you clarify?
adamwathan · a year ago
Hey! The job postings say Eastern (UTC-5) to Central European (UTC+1) — Eastern is the American east coast. Most important thing is overlap from around 9am – 12pm Eastern, so open to other US timezones as well if someone can sustainably be available during those hours.

We have a pretty collaborative/sync culture here. Everyone on the team really enjoys pair programming together or working through designs live in Figma, and wouldn't want to build the team in a way where there are people who can never work together because of timezones.

adamwathan commented on Ask HN: Who is hiring? (April 2024)    · Posted by u/whoishiring
adamwathan · a year ago
Tailwind Labs (https://tailwindcss.com/) | Remote (Americas/Europe) | Full-time

We’re hiring a Design Engineer and Staff Software Engineer to work on Tailwind CSS, Headless UI, and related projects full-time.

- Design Engineer ($275k/yr): https://tailwindcss.com/careers/design-engineer

- Staff Software Engineer ($275k/yr): https://tailwindcss.com/careers/staff-software-engineer

We're small, independent, and profitable, with a team of just 6 people doing millions in revenue, and growing sustainably every year. You'd work directly with the founders on open-source software used by millions of people.

If you like the idea of working on a small team that cares about craft and isn't trying to achieve VC scale, I think this is a pretty awesome place to do your best work.

adamwathan commented on Open-sourcing our progress on Tailwind CSS v4.0   tailwindcss.com/blog/tail... · Posted by u/ssernikk
ajayvk · 2 years ago
The current standalone tailwind CLI does not support external plugins like DaisyUI. It would be great if external plugins could be supported in the next CLI version, it will reduce the need to use npm for some projects.
adamwathan · 2 years ago
Don't you need to use npm to install DaisyUI though? If you have to install third party plugins using node already to me the solution is to use our actual node CLI instead of the standalone one.
adamwathan commented on Open-sourcing our progress on Tailwind CSS v4.0   tailwindcss.com/blog/tail... · Posted by u/ssernikk
TIPSIO · 2 years ago
Switching the theme configuration to CSS variables makes a ton of sense.

But what is the point of introducing a directive called "@theme{}" though for configuration?

Why not just do ":root{}"?

adamwathan · 2 years ago
We considered it but it felt too magical to make any CSS variable under `:root` automatically drive the existence of utility classes. Putting things under a custom at-rule like `@theme` makes that opt-in, because we know anything you put there is actually intended to drive your utility classes.
adamwathan commented on Open-sourcing our progress on Tailwind CSS v4.0   tailwindcss.com/blog/tail... · Posted by u/ssernikk
acaloiar · 2 years ago
> Standalone CLI — we haven’t worked on a standalone CLI for the new engine yet, but will absolutely have it before the v4.0 release.

This part is the most exciting to me. Given the rest of the release announcement, I'm assuming this means that it'll be built in Rust rather than embed Node. While I'm not a Rust zealot of anything, I'm very partial to not embedding Node. Particularly when it depends on using Vercel's now-abandoned pkg[1] tool.

[1] https://github.com/vercel/pkg

adamwathan · 2 years ago
It'll likely embed Node I'm afraid — the vast majority of Tailwind is written in JS so we'd have to rewrite all of that in Rust just for the standalone CLI, and migrating the entire project to Rust is impractical because we'd have no JS plugin story like we do now.
adamwathan commented on Tailwind CSS v3.3   tailwindcss.com/blog/tail... · Posted by u/adrian_mrd
pilif · 2 years ago
or to the point, how is this different from just using `style=` attributes?

One of the big reason to not do that in the past was in order to disconnect the presentation from the page structure, but if you have individual classes for each individual css property, you're back at tying the two together.

What am I misunderstanding here?

adamwathan · 2 years ago
You can’t do things like hover styles, media queries, etc. with `style=`.

Re: separating presentation from page structure, Tailwind is designed around the opinion that that whole idea was mostly wrong, similar to how frameworks like React brought back the `onClick=` attribute when everyone was saying “unobtrusive JavaScript” was the best practice

Wrote about this in depth a few years ago shortly before releasing Tailwind, can read here:

https://adamwathan.me/css-utility-classes-and-separation-of-...

adamwathan commented on WebKit Supports Nested CSS   webkit.org/blog/13813/try... · Posted by u/gslin
adamwathan · 3 years ago
One thing worth noting is that & substitutes for `:is(...)` in spirit under the hood, which means there are some significant behavior differences between native CSS nesting and Sass.

Here's one:

  .foo .bar {
    .baz & {
      color: red;
    }
  }

In Sass, that would compile to:

  .baz .foo .bar {
    color: red;
  }
With native nesting, it effectively compiles to:

  .baz :is(.foo .bar) {
    color: red;
  }
The Sass version matches this DOM structure:

  <div class="baz">
    <div class="foo">
      <div class="bar">
        ...
But the native version matches all of these structures:

  <div class="baz">
    <div class="foo">
      <div class="bar">
        ...
  
  <div class="foo">
    <div class="baz">
      <div class="bar">
        ...

  <div class="foo baz">
    <div class="bar">
      ...
Not a criticism at all (the `:is(...)` behavior is a very useful and welcome enhancement to CSS) but a notable difference worth understanding coming from Sass.

u/adamwathan

KarmaCake day1218December 6, 2014View Original