News for hackers. Stuff that matters.
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:

    div.foo#thing {
      text: "Foo"
    }
Generates this:

    <div class="foo" id="thing">Foo</div>
I realise that there's issues with css name collisions, but there's different ways that can be resolved by the compiler.
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
     Foo
Re:Nazca – New GUI for the Web by cabalamat on Wednesday November 03, 2021 @09:28AM (#29094265)
That 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.
Re:Nazca – New GUI for the Web by fao_ on Thursday November 04, 2021 @12:06PM (#29108880)
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!

Re:Nazca – New GUI for the Web by LastMuel on Wednesday November 03, 2021 @11:18AM (#29095896)
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.