6 ms·
I'd like to see CSS-shaped HTML like this: doctype html html { head { title Hello there script type='text/javascript' src='main.js' }
by pablovidal85 10y 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?
- K-Wall 10y agoJade comes somewhat close but opts for the offside rule rather than brackets and abbreviates class and id with . and # respectively.
- pablovidal85 10y agoExactly, 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.
- jjcm 10y agoJust FYI, Jade has been renamed as Pug, for whatever reason. https://github.com/pugjs https://github.com/pugjs
- montogeek 10y agoLegal reasons :)
- nbclark 10y agoIt's kind of like HAML: http://haml.info/ http://haml.info/
- pablovidal85 10y agoMore like SASS, HAML introduces a lot of syntax and is indentation-based right?
- nbclark 10y agoYeah you're right. I just meant HAML in that it's a less tag-heavy layout structure for html