4 ms·
Even though that’s a kind of strange and unworkable idea — it’s interesting to think about. Unworkable in the sense that, for example, some elements are not ph
by LeonB 3y ago
Even though that’s a kind of strange and unworkable idea — it’s interesting to think about.
Unworkable in the sense that, for example, some elements are not physically positioned inside their container elements, and sometimes even in light dark mode you might use elements to create subtle layering etc, where you’d want the least contrast.
It wouldn’t be too difficult to write a gimmick webpage though, that implements the idea, to see what kind of fun would ensue.
I’ve got some sample code here that uses the little known but very powerful “tree Walker” to change elements 1 by 1.
https://til.secretgeek.net/css/replace_text_with_property_values.html https://til.secretgeek.net/css/replace_text_with_property_va...
And you can write javascript code that alters css variable values like this:
var root = document.documentElement;
root.style.setProperty('--main-hue', 0);
I think the particular can of worms you’re suggesting could be very strange and interesting!