A container is an often-invisible layout element that pushes in from the viewport edges, providing an outer margin and background styling to a row of content. A container often holds the grid component, used for detailed layout within the row.
Containers come in two widths: large and full-width. They are identical on smaller devices, only deviating above 1080px viewport width.
The large container reaches a 1000px maximum width on large viewports.
<div class="spirit-container">
<div class="spirit-container__inner spirit-container__inner--large">
<h3>Large Container</h3>
</div>
</div>
The full-width container reaches a 1152px maximum width on large viewports.
<div class="spirit-container">
<div class="spirit-container__inner">
<h3>Large Container</h3>
</div>
</div>
Containers can be configured with vertical padding in four pre-set sizes: extra-small, small, medium, and large. These sizes are responsive, as shown below.
Class | Below 1080px | Value | 1080px and up | Value |
---|---|---|---|---|
|
|
24px |
|
32px |
|
|
32px |
|
64px |
|
|
48px |
|
96px |
|
|
96px |
|
192px |
Mix and match top and bottom padding sizes to fit your layout needs. The following full-width container has large top padding and extra small bottom padding.
<div class="spirit-container">
<div class="spirit-container__inner spirit-container__inner--padding-top-lg spirit-container__inner--padding-bottom-xs"> Padding top lg and padding bottom xs </div>
</div>
Containers provide two different background placement options: outer and inner.
Outer | Inner |
---|---|
|
|
Apply these helper classes to outer .spirit-container
or inner .spirit-container__inner
as shown above.
Class | Color |
---|---|
|
transparent |
|
|
|
|
|
|
Brushes are a key hallmark of Spirit visual style. Container is one way to orient and structure brushes within a layout. For more information about brush specifications, see brush
Use brushes to mask the top and/or bottom edges of a container’s background and contents. The brush mask creates the appearance of a brush stroke across the container.
Always use the JDRF blue background, .spirit-context--brand
.
.spirit-context--brand
to spirit-container
.spirit-container__inner
to modify it for painted edges, using spirit-container__inner--painted-edge-top
, spirit-container__inner--painted-edge-bottom
, or spirit-container__inner--painted-edge-both
.<div class="spirit-container__painted-edge-top">
<div class="spirit-container__painted-edge-top-inner">
<svg class="spirit-brush spirit-brush--painted-edge-top" aria-hidden="true">
<use xlink:href="/brushes/spirit-brushes.svg#painted-edge-top"></use>
</svg>
</div>
</div>
<div class="spirit-container__painted-edge-bottom">
<div class="spirit-container__painted-edge-bottom-inner">
<svg class="spirit-brush spirit-brush--painted-edge-bottom" aria-hidden="true">
<use xlink:href="/brushes/spirit-brushes.svg#painted-edge-bottom"></use>
</svg>
</div>
</div>
Use brushes to accent a row by adding waves to a container. The brush sits lower in the z-index than other content, peaking playfully from behind. See various examples below.
<div class="spirit-container__wave-bg spirit-container__wave-bg--wave5">
<div class="spirit-container__wave-bg-inner">
<svg class="spirit-brush spirit-brush--wave5" aria-hidden="true">
<use xlink:href="/brushes/spirit-brushes.svg#wave5"></use>
</svg>
</div>
</div>