Figuration includes several components and options for laying out your project, including wrapping containers, a powerful grid system, and responsive utility classes.
Containers are the most basic layout element in Figuration and are required when using the grid system. Choose from a responsive, fixed-width container (meaning its
max-width changes at each breakpoint) or fluid-width (meaning it’s
100% wide all the time).
While containers can be nested, most layouts do not require a nested container.
.container-fluid for a full width container, spanning the entire width of the viewport.
Since Figuration is developed to be mobile first, we use a handful of media queries to create sensible breakpoints for our layouts and interfaces. These breakpoints are mostly based on minimum viewport widths and allow us to scale up elements as the viewport changes.
For accessibility reasons, the Sass internally maps the pixel defined breakpoints into
em values. We assume a 16px default root font size, since this is the default for most browsers.
PX vs EM Controversy
While this is a very opinionated topic, Figuration has chosen the
em route for greater accessibility. We believe strongly that this is the correct direction moving forward.
Some reference material - may be competing points of view:
Figuration primarily uses the following media query ranges—or breakpoints—in our source Sass files for our layout, grid system, and components.
Since we write our source CSS in Sass, all our media queries are available via Sass mixins.
We occasionally use media queries that go in the other direction (the given screen size or smaller):
Once again, these media queries are also available via Sass mixins:
There are also media queries and mixins for targeting a single segment of screen sizes using the minimum and maximum breakpoint widths.
These media queries are also available via Sass mixins:
Similarly, media queries may span multiple breakpoint widths:
The Sass mixin for targeting the same screen size range would be:
Since Figuration is built as a mobile first framework, by default, we have created our class naming structure to not use the smallest breakpoint designation, except for a few certain instances. However, this is configurable for custom builds by overriding
$enable-bp-smallest option referenced in the Global Options settings.
Classes that apply to all breakpoints, from
xl, have no breakpoint abbreviation in them. This is because those classes are applied from
min-width: 0 and up, and thus are not bound by a media query. The remaining breakpoints, however, do include a breakpoint abbreviation.
Building from the base component or utility name, most classes are named using the format
xl. In the case of some utilites that have abbreviated names, such as the spacing utilities, the format is
The only special case is where there are
*-down variants for certain components or classes, the breakpoint designation. Only then is the minimum breakpoint designation used in the class name.
A quick example using some of Figuration’s Typography utility classes.
Right aligned text on all viewport sizes. (No
xs class designation!)
Right aligned text on viewports sized SM (small) or wider.
Right aligned text on viewports sized MD (medium) or wider.
Right aligned text on viewports sized LG (large) or wider.
Right aligned text on viewports sized XL (extra-large) or wider.
<p class="text-end">Right aligned text on all viewport sizes. (<strong>No <code>xs</code> class designation!</strong>)</p> <p class="text-sm-end">Right aligned text on viewports sized SM (small) or wider.</p> <p class="text-md-end">Right aligned text on viewports sized MD (medium) or wider.</p> <p class="text-lg-end">Right aligned text on viewports sized LG (large) or wider.</p> <p class="text-xl-end">Right aligned text on viewports sized XL (extra-large) or wider.</p>
Several Figuration components utilize
z-index, the CSS property that helps control layout by providing a third axis to arrange content. We utilize a default z-index scale in Figuration that’s been designed to properly layer navigation, tooltips and popovers, modals, and more.
Customizing these values is most likely not needed, and we don’t recommend customizing the values. However, if you change one, you will need to review and possibly update all of the other values.
Background elements—like the backdrops that allow click-dismissing—tend to reside on a lower
z-indexs, while navigation and popovers utilize higher
z-indexs to ensure they overlay surrounding content. Modals get a higher z-index so they are placed above popover/tooltip items, in the case that one or more of those items is held open.