<div class="cbp-spacing-squish-micro">
  <p>
    <strong>.cbp-spacing-squish-micro </strong>
    <br />
    Applies 8px of padding to the top and bottom padding and 12px to the left and right padding
  </p>
</div>

<div class="cbp-spacing-squish-xsmall">
  <p>
    <strong>.cbp-spacing-squish-xsmall </strong>
    <br />
    Applies 12px of padding to the top and bottom padding and 16px to the left and right padding.
  </p>
</div>

<div class="cbp-spacing-squish-small">
  <p>
    <strong>.cbp-spacing-squish-small</strong>
    <br />
    Applies 16px of padding to the top and bottom padding and 20px to the left and right padding.
  </p>
</div>

<div class="cbp-spacing-squish-regular">
  <p>
    <strong>.cbp-spacing-squish-regular</strong>
    <br />
    Applies 20px of padding to the top and bottom padding and 40px to the left and right padding.
  </p>
</div>

<div class="cbp-spacing-squish-large">
  <p>
    <strong>.cbp-spacing-squish-large</strong>
    <br />
    Applies 20px of padding to the top and bottom padding and 40px to the left and right padding.
  </p>
</div>
//spacing variables
$cbp-spacing-micro: 8px;
$cbp-spacing-xsmall: 12px;
$cbp-spacing-small: 16px;
$cbp-spacing-regular: 20px;
$cbp-spacing-large: 40px;
$cbp-spacing-xlarge: 80px;

//spacing squish classes//

//applies 8px of padding to the top and bottom padding and 12px to the left and right padding
.cbp-spacing-squish-micro {
  padding: $cbp-spacing-micro $cbp-spacing-xsmall;
}

// applies 12px of padding to the top and bottom padding and 16px to the left and right padding.
.cbp-spacing-squish-xsmall {
  padding: $cbp-spacing-xsmall $cbp-spacing-small;
}

// applies 16px of padding to the top and bottom padding and 20px to the left and right padding.
.cbp-spacing-squish-small {
  padding: $cbp-spacing-small $cbp-spacing-regular;
}

// applies 20px of padding to the top and bottom padding and 40px to the left and right padding.
.cbp-spacing-squish-regular {
  padding: $cbp-spacing-regular $cbp-spacing-large;
}

 // applies 40px of padding to the top and bottom padding and 80px to the left and right padding
.cbp-spacing-squish-large {
  padding: $cbp-spacing-large $cbp-spacing-xlarge;
}

//used for demonstration purposes only
body {
  width: 400px;
  margin: auto;
}
div {
  color: #1460aa;
  background-color: #1460aa;
  background-clip: padding-box;
  margin-bottom: 10px;
}

p {
  background-color: #edf3f9;
}
View Compiled

External CSS

  1. https://unpkg.com/cbp-ds@2.0.14/cbp-ds.css

External JavaScript

This Pen doesn't use any external JavaScript resources.