Skip to main content
Bluvy Tube
Press Esc to exit fullscreen
Volume m
/
i
Theater mode 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:

Keyboard shortcuts

Space K
Play / pause
← →
Back / forward 5 s
J L
Back / forward 10 s
0–9
Jump to 0%–90% of the video
Home End
Start / end
, .
Previous / next frame (while paused)
< >
Slower / faster
↑ ↓
Volume
M
Mute / unmute
C
Captions
F
Fullscreen
I
Picture-in-picture
T
Theater mode
?
Show this help

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 views Published on 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 comments
?
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-...
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.
View original post on Bluesky
Link copied to clipboard

Sign in

Time to take a break

You've been watching videos for 30 minutes straight: give yourself 5 minutes away from the screen. Stand up, stretch, grab a glass of water… Your videos will be right here when you're back.