Using CSS selectors in HTML templates -
after accidentally using css selector in html template started wondering if there template language or extension 1 allow syntax, , whether useful. instead of writing this:
<div id="mydiv"> <div class="first column">1</div> <div class="second column">2</div> </div>
we write like:
<div#mydiv> <div.first.column>1</div> <div.second.column>2</div> </div>
does exist?
maybe mean jade?
it html preprocessor.
the following:
doctype 5 html(lang="en") head title= pagetitle script(type='text/javascript') if (foo) { bar() } body h1 jade - node template engine #container if youareusingjade p amazing else p on it!
will translated to:
<!doctype html> <html lang="en"> <head> <title>jade</title> <script type="text/javascript"> if (foo) { bar() } </script> </head> <body> <h1>jade - node template engine</h1> <div id="container"> <p>you amazing</p> </div> </body> </html>
also, not you're asking, may zen coding. plugin code html @ high-speed. gif showing does:
it's basically:
- write pseudo-html.
- hit shortcut.
- get full html.
- ?????
- profit!
you should check editor if can support this. fwiw, use this in vim , it's awesome.
Comments
Post a Comment