For special features of the styleguide, a set of @flags and @{substitutions} is available to use on certain elements.
Substitutions help you to compose and fill your markup blueprints. Therefore, Nucleus offers placeholder functions for texts and images to be used inside the markup of elements.
Furthermore, to avoid repeating markup all over the annotations again, you may include the markup of another element with @{include:.selector}.
/**
* A navigation element for the menu bar.
*
* @atom Menu Item
* @markup
* <a class="menu-item">@{lipsum:2:words}</a>
*/
.menu-item { /* ... */ }
/**
* A menu bar which spans across full page width.
*
* @molecule Menu Bar
* @flag full-width
* @markup
* <nav class="menu">
* @{include:.menu-item}
* @{include:.menu-item}
* @{include:.menu-item}
* </nav>
*/
.menu { /* ... */ }
Flags are used to enable certain features related to Nucleus - mostly related to the visual output or processing.
For example, if you like an element to spread over the full width of a page instead of being bound inside the main content container, annotate it with @flag full-width.
/**
* Header bar with logo, navigation, and tool icons at the top of the page.
* Note: This is just a minified example.
*
* @structure Header
* @flag full-width
* @markup
* ...
*/
.SG-header { /* ... */ }
/**
* Previous button color
*
* @color
* @deprecated
*/
$color--button: #FFCC66;