Skip to content

Instantly share code, notes, and snippets.

@erquhart
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erquhart/c4f2eb05d85830aec4f6 to your computer and use it in GitHub Desktop.
Save erquhart/c4f2eb05d85830aec4f6 to your computer and use it in GitHub Desktop.
Non-dry Galen spec snippet
@@ import ../../../meta/vars.spec
======================================================================================
mobile-nav-item-header css ul.mmenu-opened .main-link.active
mobile-nav-item-header-1 css ul.mmenu-opened li:nth-child(2) > .main-link.active
mobile-nav-item-header-2 css ul.mmenu-opened li:nth-child(3) > .main-link.active
mobile-nav-item-header-3 css ul.mmenu-opened li:nth-child(4) > .main-link.active
mobile-nav-item-list css ul.mmenu-opened .mmenu-super-submenu:not(.ng-hide)
======================================================================================
@ Global Nav | mobile
--------------------------------------------------------
@@ if
mobile-nav-item-header-1
visible
@@ do
mobile-nav-item-header
image: file ../../dumps/mobile/subnav/1/objects/mobile-nav-item-header.png, ${imgErr}
mobile-nav-item-list
image: file ../../dumps/mobile/subnav/1/objects/mobile-nav-item-list.png, ${imgErr}
@@ end
@@ if
mobile-nav-item-header-2
visible
@@ do
mobile-nav-item-header
image: file ../../dumps/mobile/subnav/2/objects/mobile-nav-item-header.png, ${imgErr}
mobile-nav-item-list
image: file ../../dumps/mobile/subnav/2/objects/mobile-nav-item-list.png, ${imgErr}
@@ end
@@ if
mobile-nav-item-header-
visible
@@ do
mobile-nav-item-header
image: file ../../dumps/mobile/subnav/3/objects/mobile-nav-item-header.png, ${imgErr}
mobile-nav-item-list
image: file ../../dumps/mobile/subnav/3/objects/mobile-nav-item-list.png, ${imgErr}
@@ end
@erquhart
Copy link
Author

A little bit better, but currently doesn't work:

@@ import ../../meta/vars.spec

======================================================================================
mobile-nav-item-header          css   .mmenu-opened .main-link.active
mobile-nav-item-header-2        css   .mmenu-opened .main-link:nth-child(2).active
mobile-nav-item-header-3        css   .mmenu-opened .main-link:nth-child(3).active
mobile-nav-item-header-4        css   .mmenu-opened .main-link:nth-child(4).active
mobile-nav-item-list            css   .mmenu-opened .mmenu-super-submenu:not(.ng-hide)
======================================================================================

@ Global Nav | mobile
--------------------------------------------------------
@@ if
mobile-nav-item-header-2
  visible
@@ do
@@ set dumpDir 1
@@ end

@@ if
mobile-nav-item-header-3
  visible
@@ do
@@ set dumpDir 2
@@ end

@@ if
mobile-nav-item-header-4
  visible
@@ do
@@ set dumpDir 3
@@ end

mobile-nav-item-header
  image: file ../dumps/mobile/subnav/${dumpDir}/objects/mobile-nav-item-header.png, ${imgErr}

mobile-nav-item-list
  image: file ../dumps/mobile/subnav/${dumpDir}/objects/mobile-nav-item-list.png, ${imgErr}

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