Re:Nazca – New GUI for the Web
by spoiler on Wednesday November 03, 2021 @09:20AM
(#29094194)
I don't understand why they didn't do something like this instead:
Generates this:
I realise that there's issues with css name collisions, but there's different ways that can be resolved by the compiler.
[ Parent
| on HN ]
Re:Nazca – New GUI for the Web
by rowanseymour on Wednesday November 03, 2021 @09:36AM
(#29094326)
Was thinking the same thing. Or just copy HAML which would be...
%div.foo#thing
FooThat makes sense -- only give a tag an id if it needs one. It only needs one if ti's being referred to somewhere, and when that happens the user can give it a name, such as "thing" in this example.
See, that's exactly what I thought when I said about this.
I mean, worst case, give everything an id but don't _output_ it!
This is how JADE/PUG handled it. And, for anyone that's used css, querySelector or jQuery, it seems quite natural.
I also wonder why the author didn't pick up these standard methodologies and continue from there.