- Every sub navigation must have a depth class:
nav--depthN
- The container and each
<ul>
must support arbitrary class names to be passed to the component from the CMS. - Each
nav__item
should get an additional class corresponding to its text node, for example:<li class="nav__item">Example</li>
---><li class="nav__item nav__item--example">Example</li>
- The current node gets a class of
nav_item--self
- If the current node is a child node deeper than
nav--depth0
then the node's root list item gets a class ofnav_item--current
- If the current node is a child node deeper than
- Any class wrapped in
{{ class }}
denotes a dynamic class passed to the component from the backend/CMS. - Line breaks in the markup are for clarity, production code shouldn't have them.