Skip to content

Instantly share code, notes, and snippets.

@jnf
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save jnf/47100f455869e3d49855 to your computer and use it in GitHub Desktop.

Select an option

Save jnf/47100f455869e3d49855 to your computer and use it in GitHub Desktop.
- x = 7
.div1
.div2
.div4
- if x == 4
Totes a four.
- else
Prolly not a four.
.div3
A third div, nested in div2.
@srobbibaro

Copy link
Copy Markdown

Thanks! What if we took it one step further and created a div4 under each case of the if block. I would want div4 to be directly under div2. When the if block has ended, I would want div3 to be under div4.

@jnf

jnf commented Aug 21, 2014

Copy link
Copy Markdown
Author

If div4 is happening in each case of the if block, extract it outside the conditional. Because it's not conditional; it's apparently mandatory. :) I'm updating the gist with what I think you're asking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment