Passer au contenu principal
Bluvy Tube
Appuyez sur Échap pour quitter le plein écran
Volume m
/
i
Mode Cinéma t
f
/
CSS attr() now works on all properties in Firefox 155. Here's how it works, and how to get the most out of it:

Raccourcis clavier

Espace K
Lecture / pause
← →
Reculer / avancer de 5 s
J L
Reculer / avancer de 10 s
0–9
Aller à 0 %–90 % de la vidéo
Home End
Début / fin
, .
Image précédente / suivante (en pause)
< >
Ralentir / accélérer
↑ ↓
Volume
M
Couper / rétablir le son
C
Sous-titres
F
Plein écran
I
Image dans l’image
T
Mode cinéma
?
Afficher cette aide

CSS attr() now works on all properties in Firefox 155. Here's how it works, and how to get the most out of it:

0 vue Publié le 03/09/2026 13:15 2:59
CSS attr() now works on all properties in Firefox 155. Here's how it works, and how to get the most out of it:
10 commentaires
?
Hugo Nogueira @marabyte.com · 03/09/2026 20:36
I understand why URLs are not parsed but feels like a missed opportunity. It would be very neat for an icon library
I’m so glad to see this, but disappointed that URLs for images don’t work.

Take a website with a strict CSP, does not allow inline CSS, makes it tricky to add per-page background images (can mess with <img>, but isn’t ideal).

Maybe the HTML attr could do something to say it’s safe for CSS?
CSS by T. Afif @css-only.dev · 03/09/2026 19:49
It would be good to make a short video about the <custom-ident> case that will confuse many people, thinking they are <string> instead.

bsky.app/profile/css-...
shork @shork.xyz · 03/09/2026 16:36
nice css feature. is there any way to get that shirt though?
I feel like there might be something I'm missing, because while this is good for showing the technicals of how it works, it doesn't really tell me why it's a valuable thing to have.

Maybe I've just been out of the web loop too long.
I used this recently in custom select, to pull the label attribute of an optgroup into an inner legend element. Yes, I could write some JS to do the same thing, but doing it in a couple of lines of CSS was much quicker and more reliable.
Amos Manneschmidt @amoose.org · 03/09/2026 16:07
Looks broadly useful for popping out select css properties into the template so they can be conveniently edited in a Tailwind-like manner, but without using something as huge as Tailwind. Also looks helpful for eliminating some look and feel oriented javascript which is always a good thing.
this is. SO powerful!
This is very neat, but good lord how many devs are going to be scratching their heads when it's being included but doesn't work.

devtools css errors panel coming to a desk near you?! (it's a thing in the inspector, but we'd want this dumped like JS errors)
It's tricky because it's common to do progressive enhancement with CSS by embracing fallbacks, so an error panel might become noisy fast.

The rules panel will tell you when the attr() rules doesn't match expected syntax though.
does this come with any performance considerations as well that I need to be careful of? - I assume this is live, so changing the value of an attribute would change it in css as well
Yeah, it's live. Changing attributes already triggers CSS changes via selectors, so I don't expect this to introduce performance concerns.
Voir le post d'origine sur Bluesky
Lien copié dans le presse-papier

Connexion

Il est temps de faire une pause

Ça fait 30 minutes que vous enchaînez les vidéos : accordez-vous 5 minutes loin de l'écran. Levez-vous, étirez-vous, buvez un verre d'eau… Les vidéos vous attendront ici.