Hacker News new | ask | show | jobs
by pablovidal85 3639 days ago
I'd like to see CSS-shaped HTML like this:

  doctype html
  html {
    head {
      title Hello there
      script type='text/javascript' src='main.js'
    }
    body {
      p class='one two' {
        span Sample text
      }
    }
  }
Is there an HTML preprocessor using a similar language?
2 comments

Jade comes somewhat close but opts for the offside rule rather than brackets and abbreviates class and id with . and # respectively.
Just FYI, Jade has been renamed as Pug, for whatever reason. https://github.com/pugjs
Legal reasons :)
Exactly, I'm looking for one that uses brackets instead indentation and the rest is left untouched (no abbreviations or at least not mandatory). I can't find anything already done but at the same time is hard to believe is not done already.
It's kind of like HAML: http://haml.info/
More like SASS, HAML introduces a lot of syntax and is indentation-based right?
Yeah you're right. I just meant HAML in that it's a less tag-heavy layout structure for html