Width Atomics

Need to specifiy a specific width for an element? You've come to the right place! These classes should be used sparingly, and only used after testing heavily at all screen widths (starting with mobile). That said, if you need to specify and min, max or normal width, they can be a useful tool in the utility belt.

Values are in pixels. Keep in mind that the min-width and max-width properties override the standard width property. If you aren't using the Atlas core folder as a base for your styles, these classes work best when you're setting box-sizing to be border-box in some way. Values represent pixel unless they are a string or otherwise specified.

cssproperty value screensize
width auto, 100, 150, 200, 250, 300, 350, full (100%) all screensizes, tablet, desktop
width (available on tablet screens and larger) 400, 450, 500, unset tablet, desktop


Set the width of an element.








The following are only applied above the tablet breakpoint




<div class="width-auto border padding-sm font-weight-semibold">
<div class="width-100 border padding-sm font-weight-semibold">
<div class="width-150 border padding-sm font-weight-semibold">
<div class="width-200 border padding-sm font-weight-semibold">
<div class="width-250 border padding-sm font-weight-semibold">
<div class="width-300 border padding-sm font-weight-semibold">
<div class="width-350 border padding-sm font-weight-semibold">
<div class="display-flex align-items-center padding-sm color-danger font-size-sm">
    <div class="flex-grow-1 margin-right-xs border-color-danger border-top"></div>
    <p>The following are only applied above the tablet breakpoint</p>
    <div class="flex-grow-1 margin-left-xs border-color-danger border-top"></div>
<div class="width-400-tablet border padding-sm font-weight-semibold">
<div class="width-450-tablet border padding-sm font-weight-semibold">
<div class="width-500-tablet border padding-sm font-weight-semibold">

Responsive rules

Certain widths are too large for many mobile screens, so they are only available on larger screensizes. See the table above for information on which helpers can be applied universally.

250 ➡ 300 ➡ 400

<div class="width-250 width-300-tablet width-400-desktop border padding-sm">
    <p>250 ➡ 300 ➡ 400</p>

Unsetting widths

Another possible pattern may be that a container needs to be constrained on smaller screens but not on larger screens. In this case you can follow a mobile first approach, applying a universal width class to the element, and then undoing it on larger screens with width-unset-<screensize>.

A narrow container on small screens, then no fixed width

<div class="width-150 width-unset-tablet border padding-sm">
    <p>A narrow container on small screens, then no fixed width</p>

Available classes

List of all available classes: