Black098 / zen-coding

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

How do I traverse back up the tree when coding in Zen #148

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Try writing div#outer-wrapper>div#header>div#inner-header. How do I
write Zen code to place another div as a sibling of div#header and not of
div#inner-header?

I want to end up with:

<div id="outer-wrapper">
  <div id="header">
    <div id="inner-header">
    </div>
  </div>
  <!-- I can't figure out how to code in Zen for this sibling after I've
coded div#inner-header -->
  <div id="main">
  </div>
</div>

Thanks.

Original issue reported on code.google.com by weston...@gmail.com on 20 Apr 2010 at 3:49

GoogleCodeExporter commented 9 years ago
div#outer-wrapper>(div#header>div#inner-header)+div.my-second-div

Original comment by serge....@gmail.com on 20 Apr 2010 at 4:02

GoogleCodeExporter commented 9 years ago
Amazing!

Thanks so much for that reply. Me and my mate puzzled over that because we 
couldn't
find any docs referring to it and maybe I've missed it in a video or something.

Does it have a particular function name within Zen?

Original comment by weston...@gmail.com on 22 Apr 2010 at 9:45

GoogleCodeExporter commented 9 years ago
Our docs is a mess right now, but you should keep tracking Changelog to get 
latest updates in ZC project

Original comment by serge....@gmail.com on 22 Apr 2010 at 9:47

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/zen-coding/wiki/Changelog

Original comment by serge....@gmail.com on 22 Apr 2010 at 9:48

GoogleCodeExporter commented 9 years ago
Thanks a lot, so the traversing is new.

Can you actually add content inside tags e.g. div#header>h1#logo {h1 content 
here}

You could virtually code entire pages this way.

Thanks.

Original comment by weston...@gmail.com on 22 Apr 2010 at 10:31

GoogleCodeExporter commented 9 years ago
You shouldn't write entire pages in ZC: you won't get any productivity boost 
because you have to think about 
your code in HTML and then translate it into a complex ZC abbreviation. This 
will introduce lots of nesting errors 
in your code so you always have to check your result before using it. Thus, 
your productivity is decreased.

To get maximum coding speed you should write small code  abbreviations, expand 
them and modify 
placeholders. In this case your brain can quickly translate small HTML snippet 
into ZC abbreviation without 
errors.

Original comment by serge....@gmail.com on 22 Apr 2010 at 11:15