sxsdlxw / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

Proposal: make < go to parent dom #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sparkup use "<" to denote a move to parent element.
This adds a lot of flexibility.
Also a sequence should work too. Eg.: << goes up in the dom three 2 times.

Original issue reported on code.google.com by hand...@gmail.com on 18 Jun 2010 at 4:34

GoogleCodeExporter commented 9 years ago
You'll loose much more flexibility because this will force you to write 
expressions on a new, empty line. In ZC you can use parentheses for grouping

Original comment by serge....@gmail.com on 18 Jun 2010 at 7:22

GoogleCodeExporter commented 9 years ago
Not at all, you shouldn't need a new line.
Something like this on ZC:
(head>link*6+script:scr*3)(body>(div.wrapper>.leftMenu+.conteudo+.rigthMenu).foo
ter)
Would become
head>link*6+script:src*3<body>div.wrapper>.leftMenu+.conteudo+.rigthMenu<.footer

And both would generate the html attached

Original comment by hand...@gmail.com on 21 Jun 2010 at 3:54

Attachments:

GoogleCodeExporter commented 9 years ago
True, but the problem is that if there's already a tag before your caret, 
you'll get unwanted result (e.g. if I have `<div>` tag and want to expand 
`strong` ZC expression, Sparkup recognize it as `<div>strong` abbreviation)

Original comment by serge....@gmail.com on 21 Jun 2010 at 4:14