Hacker News new | ask | show | jobs
by mikae1 174 days ago
> And yes, I abuse the slot attribute even when I'm only using CSS, without JS.

In CSS, how do you target <div slot="hero-blurb"> based on the "hero-blurb" slot?

div[slot="hero-blurb"]?

1 comments

Yes, though often I’ll omit the tag, and just target [slot=“hero-blurb”]. Depends on the situation.