HomeID utilities

Custom HomeID classes with a purpose to reduce the frequency of highly repetitive declarations.

Spacing

Assign responsive-friendly margin or padding values to an element or a subset of its sides with shorthand classes. Includes support for individual properties, all properties, and vertical and horizontal properties.

Spacing utilities that apply to all breakpoints, from xs to 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.

The classes are named using the format {property}{sides}-{size} for xs and {property}{sides}-{breakpoint}-{size} for sm, md, lg, and xl.

Where property is one of:

  • m- for classes that set margin
  • p - for classes that set padding

Where sides is one of:

  • t - for classes that set margin-top or padding-top
  • b - for classes that set margin-bottom or padding-bottom
  • l - for classes that set margin-left or padding-left
  • r - for classes that set margin-right or padding-right
  • x - for classes that set both *-left and *-right
  • y - for classes that set both *-top and *-bottom
  • blank - for classes that set a margin or padding on all 4 sides of the element

Where size is one of:

  • 0 - for classes that eliminate the margin or padding by setting it to 0
  • 1 - (by default) for classes that set the margin or padding to $spacer * .3125
  • 2 - (by default) for classes that set the margin or padding to $spacer * .625
  • 3 - (by default) for classes that set the margin or padding to $spacer
  • 4 - (by default) for classes that set the margin or padding to $spacer * 1.25
  • 5 - (by default) for classes that set the margin or padding to $spacer * 1.5
  • 6 - (by default) for classes that set the margin or padding to $spacer * 1.875
  • 7 - (by default) for classes that set the margin or padding to $spacer * 2.5
  • 8 - (by default) for classes that set the margin or padding to $spacer * 3.125
  • 9 - (by default) for classes that set the margin or padding to $spacer * 3.75
  • 10 - (by default) for classes that set the margin or padding to $spacer * 4.375
  • 11 - (by default) for classes that set the margin or padding to $spacer * 5
  • 12 - (by default) for classes that set the margin or padding to $spacer * 5.625
  • 13 - (by default) for classes that set the margin or padding to $spacer * 6.25
  • 14 - (by default) for classes that set the margin or padding to $spacer * 6.875
  • 15 - (by default) for classes that set the margin or padding to $spacer * 7.5
  • 16 - (by default) for classes that set the margin or padding to $spacer * 9.375
  • 17 - (by default) for classes that set the margin or padding to $spacer * 10.625
  • auto - for classes that set the margin to auto

(You can add more sizes by adding entries to the $spacers Sass map variable via: _theme-variables.scss.)

HomeID includes several offset classes, like:

<div class="ml-n2">.ml-n2</div>
<div class="ml-n3">.ml-n3</div>
<div class="mr-n2">.mr-n2</div>
<div class="mt-n1">.mt-n1</div>
<div class="mt-n5">.mt-n5</div>
<div class="mt-n6">.mt-n6</div>
<div class="mt-n9">.mt-n9</div>
<div class="mb-n9">.mb-n9</div>

Font sizes

HomeID includes several responsive font size, like:

.fs-13

.fs-16

.fs-16

.fs-17

.fs-18

.fs-20

.fs-22

.fs-23

.fs-24

.fs-32

.fs-34

.fs-35

.fs-42

.fs-56

.fs-60

.fs-64

<p class="fs-13">.fs-13</p>
<p class="fs-15">.fs-16</p>
<p class="fs-16">.fs-16</p>
<p class="fs-17">.fs-17</p>
<p class="fs-18">.fs-18</p>
<p class="fs-20">.fs-20</p>
<p class="fs-22">.fs-22</p>
<p class="fs-23">.fs-23</p>
<p class="fs-24">.fs-24</p>
<p class="fs-32">.fs-32</p>
<p class="fs-34">.fs-34</p>
<p class="fs-35">.fs-35</p>
<p class="fs-42">.fs-42</p>
<p class="fs-56">.fs-56</p>
<p class="fs-60">.fs-60</p>
<p class="fs-64">.fs-64</p>

Line Height

.lh-12

.lh-13

.lh-15

.lh-1625

.lh-17

.lh-182

.lh-184

.lh-2

<p class="lh-12">.lh-12</p>
<p class="lh-13">.lh-13</p>
<p class="lh-15">.lh-15</p>
<p class="lh-1625">.lh-1625</p>
<p class="lh-17">.lh-17</p>
<p class="lh-182">.lh-182</p>
<p class="lh-184">.lh-184</p>
<p class="lh-2">.lh-2</p>

Opacity

.opacity-1

.opacity-2

.opacity-3

.opacity-4

.opacity-5

.opacity-6

.opacity-7

<p class="opacity-1">.opacity-1</p>
<p class="opacity-2">.opacity-2</p>
<p class="opacity-3">.opacity-3</p>
<p class="opacity-4">.opacity-4</p>
<p class="opacity-5">.opacity-5</p>
<p class="opacity-6">.opacity-6</p>
<p class="opacity-7">.opacity-7</p>

Background Gradient

.bg-gradient-1
.bg-gradient-2
.bg-gradient-3
.bg-gradient-4
.bg-gradient-5
.bg-gradient-6
<div class="bg-gradient-1 p-5 mb-3">.bg-gradient-1</div>
<div class="bg-gradient-2 p-5 mb-3 text-white">.bg-gradient-2</div>
<div class="bg-gradient-3 p-5 mb-3 text-white">.bg-gradient-3</div>
<div class="bg-gradient-4 p-5 mb-3 text-white">.bg-gradient-4</div>
<div class="bg-gradient-5 p-5 mb-3 text-white">.bg-gradient-5</div>
<div class="bg-gradient-6 p-5 mb-3">.bg-gradient-6</div>

Border

.border-2x

.border-3x

.border-4x

.border-5x

.border-6x

<p class="py-5 border-left border-2x pl-3">.border-2x</p>
<p class="py-5 border-left border-3x pl-3">.border-3x</p>
<p class="py-5 border-left border-4x pl-3">.border-4x</p>
<p class="py-5 border-left border-5x pl-3">.border-5x</p>
<p class="py-5 border-left border-6x pl-3">.border-6x</p>

Text

.text-lighter

.text-gray-light

.text-gray

<p class="text-lighter">.text-lighter</p>
<p class="text-gray-light">.text-gray-light</p>
<p class="text-gray">.text-gray</p>

Background Gray

.bg-gray-01
.bg-gray-02
<div class="bg-gray-01 p-5 mb-3">.bg-gray-01</div>
<div class="bg-gray-02 p-5 mb-3">.bg-gray-02</div>

Shadow

.shadow-xxs-1

.shadow-xxs-2

.shadow-xs-1

.shadow-xs-2

.shadow-sm-1

.shadow-sm-2

.shadow-1

.shadow-2

.shadow-lg-1

.shadow-lg-2

.shadow-lg-3

<p class="p-4 shadow-xxs-1">.shadow-xxs-1</p>
<p class="p-4 shadow-xxs-2">.shadow-xxs-2</p>
<p class="p-4 shadow-xs-1">.shadow-xs-1</p>
<p class="p-4 shadow-xs-2">.shadow-xs-2</p>
<p class="p-4 shadow-sm-1">.shadow-sm-1</p>
<p class="p-4 shadow-sm-2">.shadow-sm-2</p>
<p class="p-4 shadow-1">.shadow-1</p>
<p class="p-4 shadow-2">.shadow-2</p>
<p class="p-4 shadow-lg-1">.shadow-lg-1</p>
<p class="p-4 shadow-lg-2">.shadow-lg-2</p>
<p class="p-4 shadow-lg-3">.shadow-lg-3</p>

Hover Shadow

.shadow-hover-xxs-1

.shadow-xxs-2

.shadow-hover-xxs-2

.shadow-hover-xs-2

.shadow-hover-sm-1

.shadow-hover-sm-2

.shadow-hover-1

.shadow-hover-2

.shadow-hover-lg-1

.shadow-hover-lg-2

.shadow-hover-lg-3

<p class="p-4 shadow-hover-xxs-1">.shadow-hover-xxs-1</p>
<p class="p-4 shadow-hover-xxs-2">.shadow-xxs-2</p>
<p class="p-4 shadow-hover-xs-1">.shadow-hover-xxs-2</p>
<p class="p-4 shadow-hover-xs-2">.shadow-hover-xs-2</p>
<p class="p-4 shadow-hover-sm-1">.shadow-hover-sm-1</p>
<p class="p-4 shadow-hover-sm-2">.shadow-hover-sm-2</p>
<p class="p-4 shadow-hover-1">.shadow-hover-1</p>
<p class="p-4 shadow-hover-2">.shadow-hover-2</p>
<p class="p-4 shadow-hover-lg-1">.shadow-hover-lg-1</p>
<p class="p-4 shadow-hover-lg-2">.shadow-hover-lg-2</p>
<p class="p-4 shadow-hover-lg-3">.shadow-hover-lg-3</p>