logoalt Hacker News

c-smile12/09/20240 repliesview on HN

Eh, if you drink, then drink...

1. Add `;` as a separator of elements, so you may have:

   { a: "foo"; b:"bar; }
2. Add array tags and space separated value lists so you may have

   { a: 12 13 14; }

   to be treated as [12, 13, 14] with the tag " ". Normal arrays are parsed with the tag ","
3. Add "functors" as, again, tagged arrays

   rgb(128,128,14);

   will be parsed to an array with the tag  "rgb". Also you may have calc(128 + 14);
4. Add tagged numbers so

   90deg 

   will be parsed as a number with the tag "deg"
And you will get pretty much CSS that is proven to define quite complex constructs with minimal syntax.