diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-01-15 23:43:45 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-01-16 01:58:42 +0100 |
| commit | e76118ea080646cff4ed3017a9423ca299806e05 (patch) | |
| tree | ce1edad9782ff2d9b235add33e6e53ce175f87dc /test | |
| parent | 5209268ce43e78dabdddeec761f431fb0f23fe5b (diff) | |
| download | chawan-e76118ea080646cff4ed3017a9423ca299806e05.tar.gz | |
cascade: basic CSS variable support
and once again, there was light...
Well, it barely works, but it's enough to get colors back on most sites.
Nested variables aren't supported for now, and shorthand expansion only
"works" for `background' (it's a hack).
Props to the W3C for introducing the C preprocessor to CSS - I was
starting to confuse it with JSSS after calc().
Diffstat (limited to 'test')
| -rw-r--r-- | test/layout/variables.color.expected | 2 | ||||
| -rw-r--r-- | test/layout/variables.html | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/layout/variables.color.expected b/test/layout/variables.color.expected new file mode 100644 index 00000000..59986144 --- /dev/null +++ b/test/layout/variables.color.expected @@ -0,0 +1,2 @@ +[38;2;255;255;255m[48;2;128;0;128mpurple[39m [49m + diff --git a/test/layout/variables.html b/test/layout/variables.html new file mode 100644 index 00000000..cd6d3696 --- /dev/null +++ b/test/layout/variables.html @@ -0,0 +1,7 @@ +<style> +a { --purple: purple; color: var(--purple) } +div { color: white; --pink: yellow !important; background-color: var(--purple) } +</style> +<a> +<div>purple</div> +</a> |