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:

zen coding animated gif

it's basically:

  1. write pseudo-html.
  2. hit shortcut.
  3. get full html.
  4. ?????
  5. profit!

you should check editor if can support this. fwiw, use this in vim , it's awesome.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -