kristoff-it / zine

Fast, Scalable, Flexible Static Site Generator (SSG)
https://zine-ssg.io
552 stars 25 forks source link

"valid HTML" #54

Closed 3052 closed 2 weeks ago

3052 commented 2 weeks ago

I saw this:

SuperHTML templates are valid HTML and the templating logic is expressed through scripted attributes.

<ul :loop="$page.tags">
  <li :text="$loop.it"></li>
</ul>

https://kristoff.it/blog/zine-ssg-zig/

and immediately my brain said "thats not valid HTML". looks like my suspicion was correct:

The Namespaces in XML Recommendation [XML Names] assigns a meaning to names containing colon characters. Therefore, authors should not use the colon in XML names except for namespace purposes, but XML processors must accept the colon as a name character.

https://www.w3.org/TR/2008/REC-xml-20081126/#sec-common-syn

kristoff-it commented 2 weeks ago

I'm following the HTML living spec from whatwg and there is no special rule for colon presence in html attributes. https://html.spec.whatwg.org/#attributes-2

Pedantry aside, SuperHTML is a templating language so special attributes also never get included in the final output.