..._if

set the class of a tag to ’...’ depending on a condition

see if, zena 1.0

You can use any kind of RubyLess code inside the condition.

Example:

<ul do='menus from root'>
  <li do='each' on_if='ancestor?(main)' do='link'/>
</ul>

Read the condition as “set class to ‘on’ if the current node is an ancestor of the main node”