WIP better style management

This commit is contained in:
tristan 2024-01-01 04:41:56 +00:00
parent 35b8cf7472
commit 003100e691
4 changed files with 221 additions and 29 deletions

View file

@ -34,7 +34,7 @@ in rec {
if !(builtins.isAttrs attrs) then
throw "HTML tag requires attribute set"
else {
inherit attrs;
inherit tag attrs;
__functor = self: child:
if !(isTag child) then
throw "tag child must be tag, list, or string"
@ -47,7 +47,7 @@ in rec {
isTag = tag:
(builtins.isString tag || builtins.isList tag
|| (tag ? toString && builtins.isFunction tag.toString));
|| (tag ? __toString && builtins.isFunction tag.__toString));
addToHead = page: heads:
page // {