GeistHaus
log in · sign up

Pure CSS Mixin for Displaying Values of Custom Properties

kizu.dev

Do you write CSS? Do you use custom properties with calculations? Do you want to preview their values while you’re debugging them? What if you could do so by setting just one additional custom property? Without any JS? In this article, I present a native CSS mixin that will output various values as pseudo-elements.

6 pages link to this URL
Brutalist HTML quine

Idea by Leon Bambrick (2019) This technique uses CSS magic to expose the full tag structure underlying the page. In this form not very practical[1] [2], but can come handy for visualizing dynamic JS-generated content? In any case the philosophy behind it — and this particular application of the term “brutalist” — resonates with the goals of malleable, or at least explorable software: <p>A different but somehow related topic I like is <a href="https://en.wikipedia.org/wiki/Brutalist_archit...

1 inbound link website en
My 2025 in CSS

For me, 2025 was a much less productive year than 2024. A mix of industry and world frustrations, personal issues, and just certain people being mean — all of that made me live on borrowed spoons for most of the year. This post won’t have any of that, of course, but will contain a roundup of everything I wrote about CSS, so if you missed something — it is a good way to catch up!

1 inbound link website en
Future-Proofing Indirect Cyclic Conditions

When working on another blog post, I noticed that my blog’s styles were broken in Chrome Canary. What happened? A change in how “short-circuiting” of custom property fallbacks works.

0 inbound links website en
CSS Mixins Everywhere

On Monday, I published a new article: “Pure CSS Mixin for Displaying Values of Custom Properties”. It is a long one, but you don’t have to read it fully to get something out of it, as I also published an npm package that allows you to use the mixin described in the article right away. But then… I wondered. What if this mixin was available _everywhere_ in my browser?

0 inbound links website en