A SUIT collection of utility classes for common, reusable, low-level CSS traits. The collection includes size, display, layout, link, space, state, and text utilities.
Read more about SUIT's design principles.
…is a convenient way to install all the SUIT utility packages:
Utilities are a low-level layer in your CSS. They have a very narrow scope and may end up being used frequently, due to their separation from the nature of their content. As a result, once a class is in significant use great care should be taken before modifying it.
Each utility class modifies a single trait (a small collection of similar styles).
To apply a trait, or a combination of traits to an element, add the corresponding class directly to the HTML.
Together, they can form a wide variety of UI patterns from simple principles. Although you won't always want to use combinations of utilities to generate more complicated patterns, the option is there. Refactoring an HTML template to move particular utility traits into a CSS component's styles is a relatively simple task.
The following contrived example would be a structural template for a simple tweet-like component. You would then create a new component CSS file for any additional, specific styles (often a "skin" or "theme") needed to fully realise the component.
<article class="Tweet"> <a class="u-objRight" href="[permalink]"> [timestamp] </a> <a class="u-objLeft" href="[href]"> <img src="[src]" alt="[username]'s avatar"> </a> <div class="u-sizeFill"> <a class="u-linkComplex" href="[url]"> <span class="u-linkComplex-target">[full-name]</span> <span>@username</span> </a> <p> <a class="u-linkComplex" href="#"> @<span class="u-linkComplex-target">username</span> </a> [tweet-text] </p> <div class="u-textMute"> <a href="#"> <span>Expand</span> <span class="u-isHidden">Collapse</span> </a> <a class="u-linkComplex" href="#"> <i class="Icon Icon--reply"></i> <span class="u-linkComplex-target">Reply</span> </a> <a href="#"> <i class="Icon Icon--favorite"></i> <span class="u-isHiddenVisually">Favorite</span> </a> ... </div> </div> </article>
- Google Chrome (latest)
- Opera (latest)
- Firefox 4+
- Safari 5+
- Internet Explorer 8+