Show newer

Tailwind does away with that indirection: you apply your design constraints directly in the component, using plain CSS. It provides "utility classes" like p-0 to p-9, to apply a little to a lot of padding, respectively, to an element. Whatever you choose, it'll be consistent.

Show thread

This layer of indirection was intended to allow you to re-use your classes in different HTML elements.

But in the age of component-based architecture, is that still useful? We write our HTML once for our components, and then re-use those components across our codebase.

Show thread

So how about we just define the constraints in, say, CSS variables?

Well, you could do that, but consider how you would use those.

You'd keep switching between your components and your styles, defining new classes in your CSS that rely on the constraints, and then applying these classes in your components. It adds a layer of indirection between the styles and the components to apply them to.

Show thread

This idea isn't unique to Tailwind. Component libraries like Chakra UI and Material-UI apply it already.

However, to enable the sharing of constraints across your app, these libraries define their styles in JavaScript, using tooling to prevent them from interfering with yours.

This leads to inflated bundle sizes and complex tooling.

Show thread

To understand Tailwind, you need to understand constraint-based design, in which UI elements adhere to a set of constraints designed to make them compose well together to make a harmonious whole.

To go down this rabbit hole, see:

Show thread

We're seeing get quite some traction, so I figured it was about time to try to understand what sets it apart and what problem it solves.

I think I get it now, and to solidify my understanding, I'm going to try to articulate its benefits.

I've been interested in property-based testing for a while, but never had a clear use case for which it was easy to implement. Until recently, and I just submitted a fix for the second edge case fast-check discovered we weren't handling properly.

Really exciting, that feeling of having learned something new that will hopefully be useful more often.

It's here! My masterpiece, the last VSCode extension you will ever need: Whoopee cushion keyboard.

Yes, it makes fart sounds when you type.

That's it. That's the extension.

Get it here:

Or don't, that's probably better.

I've managed to hold it in until this toot, and I don't think anyone's got wind of it yet, but I'm almost ready to unleash my next project onto the world. And believe me, it's going to be a whooper. I'm pumped!

(Or it falls flat on its face. We'll see.)

Hot diggity damn. If you thought having to support different browsers was bad, try supporting Node before ES modules, Node running without ES modules on a version that does support ES modules, Node with ES modules, and the variety of bundlers people are using to package projects for the browser.

@nolan That allows you to do away with dev, test, and acceptance environments. Instead, every change has its own environment, with high confidence that it will behave in the same way as your production environment.

@nolan For me, the benefits of serverless are not so much the cost of running your app like you usually would (I'm not sure if that's cheaper - especially if you're locked in).

However, the marginal costs of spinning up additional instances that are otherwise equal to your production environment are so low, that is becomes feasible to do so for every minor new feature you develop.

Well what do you know - the app actually kept it together!

Turns out looping back your audio output as microphone in software is less foolproof though (the fool being me). Ended up struggling for what felt like an hour until I just put my microphone next to a speaker connected to a different device 😕

Show thread

You know how people tell you not to deploy on Fridays?

This evening I'll be hosting a virtual event facilitated by an app I wrote *today*.

What could go wrong?

If you look up regular expressions on MDN, it now includes an explicit example highlighting that \w does not actually match all alphanumeric characters in most languages.

Hopefully that will result in fewer people being told that their actual, real name is "not valid".

Some of the more conventional arguments are so easy to brush aside, because they're not about the actual problem.

"I don't mind if strangers look at me going to the bathroom without me knowing."

"A Facebook ad doesn't influence me."

"You can block ads."

Show thread

Honestly I think this is my new favourite way to explain why I value privacy. It's concise, easily understandable, and emphasises how it's important even if it doesn't directly affect someone personally.

Anyone can bombard supporters of your favourite political party with articles and videos about how voting doesn't matter anyway, trying to persuade them to stay home for elections. All you need is money.

That's why targeted ads are harmful, and why privacy for everyone is important.

Show older

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!