inconsequence
musings on subjects of passing interest
CSS.registerProperty and @property considered harmful
I recently discovered what looked like a cool new feature in CSS. After working on leveraging it to make CSS variables work even better with xinjs's css library I realized it's actually a complete disaster and must be avoided at all costs.
Oops.
Here's what I've written covering this matter in the xins
documentation:
@property and CSS.registerProperty() considered harmful
This new CSS feature is well-intentioned but ill-considered. I advise against using it yourself until its serious flaws are addressed. The problem is that if someone registers a variable you're using or you register a variable someone else is using then your CSS may be broken. And you can't re-register a variable either.
This is a bit like the problem that xinjs
Component
works around with tagNames, but in practice far more difficult to solve. It is impossible to tell if a given instance of a given variable name is an intentional reuse (probably) or a new separate variable. No-one intentionally defines two different components with the same tag.
In a nutshell, instead of making CSS variables more dependable, it makes them inherently fragile and there's no real workaround except for generating all properties via a single javascript library throws fits if anyone does the wrong thing. You can't know if a third party library will break your code or you will break its. It's horrible.
— Tonio Loewald, 6/27/2025
Recent Posts
CSS.registerProperty and @property considered harmful
6/27/2025
I love CSS variables, but this new feature of CSS makes them fragile and there's no obvious workaround. Don't use it.
What should a front-end framework do?
6/3/2025
This article introduces xinjs, a highly opinionated front-end framework designed to radically simplify complex web and desktop application development. Unlike frameworks that complicate simple tasks or rely on inefficient virtual DOMs, xinjs leverages native Web Components, direct DOM manipulation, and a unique proxy-based state management system to minimize boilerplate, boost performance, and enhance maintainability, allowing developers to achieve more with less code.
Squircles
5/5/2025

Tired of those boring rounded rectangles? Squircles are the next evolution in smooth, visually appealing shapes, and while perfect execution is tricky, Amadine's does a nice job with them.
Blender Gets Real
3/26/2025

Flow, the Blender-animated film, took home the Oscar for Best Animated Feature. But it's more than just a win for a small team; it's a monumental victory for open-source software and anyone with a vision and a limited budget.
The future's so bright… I want to wear AR glasses
2/4/2025

So much bad news right now… It's all a huge shame, since technology is making incredible strides and it's incredibly exciting. Sure, we don't have Jetsons-style aircars, but here's a list of stuff we do have that's frankly mind-blowing.
Contrary to popular belief, AI may be peaking
1/21/2025

Is artificial intelligence actually getting *smarter*, or just more easily manipulated? This post delves into the surprising ways AI systems can be tricked, revealing a disturbing parallel to the SEO shenanigans of the early 2000s. From generating dodgy medical advice to subtly pushing specific products, the potential for AI to be used for nefarious purposes is not only real but the effects are already visible.