Advertisement · 728 × 90

Posts by Lea Verou, PhD

YAY THEY FUCKING DID IT A PERFECT SPLASHDOWN FUCK YEAH SCIENCE

1 week ago 123 15 1 1

Reminder

1 week ago 549 217 15 3
Preview
Actually, people love to work hard - Anil Dash A blog about making culture. Since 1999.

One of the biggest lies that media keeps repeating from right-wing commentators & politicians is “people don’t want to work anymore”. Actually, people *love* to work hard — if the work is meaningful and workers are respected. It’s a management skill issue. anildash.com/2026/04/06/p...

1 week ago 482 111 13 14

The thing that really makes people stupid is wanting to look smart more than they want to learn.

1 week ago 107 24 0 4
Video

HTML in Canvas API is NUTS

1 week ago 347 34 6 4
Preview
Modern CSS Feature Support For Shadow DOM Tracking the state of support for CSS features within and across the shadow DOM to provide visibility into feature parity, usage details, and outstanding issues and bugs.

I’m excited to share a new project from Adobe Spectrum Web Eng that tracks support for #CSS features within and across the shadow DOM.

The goal is to provide visibility into feature parity and outstanding issues. We hope you find it useful - open to contributions!

shadow-dom-css.adobe.com

1 week ago 49 15 4 2

It’s not a “talk” targeting devs in general, it was meant for the CSS WG. There are minutes, not a video though.

2 weeks ago 2 0 1 0
(next to a photo of comedian Ron Funches) “You said we had no money for teachers, but they can pay fucking ICE agents six figures?"

(next to a photo of comedian Ron Funches) “You said we had no money for teachers, but they can pay fucking ICE agents six figures?"

2 weeks ago 1114 250 12 3

YES!
There are two schools of thought:
1. Encapsulation exists to prevent accidental clashes
2. Encapsulation is a super-strict boundary to prevent ALL access

1 helps, 2 usually causes more problems than it solves.
The reason shadow DOM has such poor UX is that it's designed with the 2nd paradigm.

2 weeks ago 4 0 0 0

Thank you all for voting! Thanks to your input we managed to reverse the resolution that forced all mixins to be scoped — sibling and ancestor rules will no longer be silently dropped from mixins. 🎉

My slides: webplatform.design/talks/mixins
Relevant WG resolution: github.com/w3c/csswg-dr...

2 weeks ago 16 0 3 0
Advertisement

This ended up being such a useful lil' utility I just published a package with it so others can enjoy hassle-free symbols by the truckload!
www.npmjs.com/package/get-...

2 weeks ago 20 0 0 1

How would you use it? What would you expect it to return?

2 weeks ago 0 0 1 0

So anchor() resolves differently on each property. How would you expect it to resolve there?

2 weeks ago 0 0 1 0

Have you needed to use anchor() in a CSS property where it didn't work? Send me your use cases!

2 weeks ago 5 1 7 1

I actually asked the group if we should enable this yesterday, but didn't want to jump the gun and just enable it myself so I posted it in one of my own repos. But yes, eventually these should live in csswg-drafts.

3 weeks ago 1 0 1 0
Preview
What mixin behavior feels most natural to you around nested rules? · LeaVerou blog · Discussion #137 🚨 Want mixins in CSS? Help the CSS WG by telling us what feels natural to you! Look at this code: @mixin --foo(--arg <length>) { @result { &, & > h2, & + p { width: var(--arg); } } } div { @apply -...

Yes, but also… github.com/LeaVerou/blo...

Spoiler: No, you can't get 100px, 200px, 300px with the current proposal, even if you don't type the --arg.

3 weeks ago 2 0 1 0
Preview
What mixin behavior feels most natural to you around nested rules? · LeaVerou blog · Discussion #137 🚨 Want mixins in CSS? Help the CSS WG by telling us what feels natural to you! Look at this code: @mixin --foo(--arg <length>) { @result { &, & > h2, & + p { width: var(--arg); } } } div { @apply -...

Please also look at my reply to this: github.com/LeaVerou/blo...

3 weeks ago 1 0 0 0
Advertisement

Thanks for writing that up, I was also thinking that most people ended up ignoring the type argument. 😞

Though the result does still show us something important: that everyone, no matter what, finds it weird if the sibling rule is dropped. That’s not an acceptable tradeoff for *anybody*.

3 weeks ago 2 0 2 0

This is the second option, please vote?

3 weeks ago 0 0 0 0
@mixin --foo(--arg <length>) {
  @result {
    &, & > h2, & + p {
      width: var(--arg);
    }
  }
}

div {
  @apply --foo(10em);
  font-size: 10px;
}
div > h2 {
  font-size: 20px;
}
div + p {
  font-size: 30px;
}

@mixin --foo(--arg <length>) { @result { &, & > h2, & + p { width: var(--arg); } } } div { @apply --foo(10em); font-size: 10px; } div > h2 { font-size: 20px; } div + p { font-size: 30px; }

🚨 Want mixins in CSS?
Help the CSS WG by telling us what feels natural to you!

Look at the code in the screenshot. What resulting widths would *you* find least surprising for each of div, div > h2, div + p?

Polls:
┣ Github: github.com/LeaVerou/blo...
┗ Mastodon: front-end.social/@leaverou/11...

3 weeks ago 51 24 9 2

If I may ask, what makes interest invokers important to you?

3 weeks ago 0 0 1 0

Do you mean interest invokers? Because :interest-target is a subfeature of that, which of course they wouldn't implement without the main feature (which they are opposed to, see github.com/WebKit/stand... )…

3 weeks ago 2 0 1 0

(Naturally, AI agents were involved in this…)

3 weeks ago 5 0 0 0
Preview
a cartoon of a green snake with potato-yi written on the bottom ALT: a cartoon of a green snake with potato-yi written on the bottom

After 16 years of using git, it finally happened: I came across a use case for using git to track changes to the .git directory itself. 🥲

3 weeks ago 31 0 2 0

Kids are so weird sometimes.

Tonight, at dinner, I suddenly notice my 6 year old staring into the void, looking pensive.
Eventually, she exclaims “I am completely lost with where I am in my life!”.

Join the club, kiddo. Join the club. 🤣🤣🤣

4 weeks ago 75 0 3 1
Advertisement
Lea Verou, PhD (@leaverou@front-end.social) @westbrook@mastodon.social When designing any product/API/language a common tension is: 1. Cover all use cases at 80% (low-level primitive) vs 2. Cover only the common cases at 100% (high-level prim...

I agree I could have worded it better. I explained what I meant in a bit more detail here: front-end.social/@leaverou/11...

4 weeks ago 0 0 0 0

It has yet to pull that sh*t with me 😅 but it really is fascinating how much worse it is with CSS compared to literally anything else.

4 weeks ago 2 0 1 0

Have you found a way to grant permissions for compound commands, without simply granting permissions for everything?

4 weeks ago 0 0 0 0

Claude: I can understand complex architectures in minutes and write highly maintainable code in a fraction of the time!

Also Claude: Um, how do I put this. I know you gave me permission to run these terminal commands, but I need you to approve this compound one manually because ampersands are hard.

4 weeks ago 14 0 2 0

I don’t have time to do as many conference talks these days but @cssday.nl always has a special place in my heart. It’s such a fantastic conference, both for the content and the community. If you can go, don’t miss it!

4 weeks ago 18 6 0 0