MotivationInstallDocsCustomize
MotivationInstallDocsCustomize
  • Overview
  • Important! Purge!
  • Getting Started
    • Colors and Pseudo Classes
      • Colors
        • Color Shades

        • Psuedo Classes

      • Classes with Colors
        • Text Color

        • Background Color

        • Border Color

        • Outline Color

        • Text Decoration

        • Selection

      • Transitions
        • Transition Classes

        • With Pseudo Classes

      • Additional Classes
        • Font Size

        • Font Family

        • Font Weight

        • Text Decoration & Style

        • Border Width & Style

        • Outline Width & Style

    • Dark Mode
      • With JS

      • No JS

      • Grid
        • Class Definitions

        • Responsive Examples

        • Responsive Examples
          • Breakpoints

          • Max Breakpoints

          • Examples

          • Margin
            • Classes

            • Examples

          • Padding
            • Classes

            • Examples

          • Border Width
            • Classes

            • Examples

          • Outline Width
            • Classes

            • Outline Offset

            • Examples

          • Width
            • Rem Values

            • Percantage Values

            • Screen relative Values

            • XS - XL

          • Height
            • Rem Values

            • Percantage Values

            • Screen relative Values

            • XS - XL

          • Display
          • Flex
            • Flex Direction

            • Flex Wrap

            • Shrink & Grow

            • Justify Content

            • Align Content

            • Align Items

            • Align Self

            • Not Included

          • Text/Font
            • Font Size

            • Line Height

            • Letter Spacing

          • Position
            • Top Left Right & Bottom

          • Overflow
            • Overflow x & y

          • Box Sizing
        • Box-Shadow
          • Size

          • Color

          • Respoinsive

          • Psuedo States

          • Other Utilities
            • Text/Font
              • Align

              • Transform

              • Indent

              • Wrap

              • Font Family

              • Font Weight

              • Font Style

              • Text Decoration

              • Decoration Thickness

            • Border
              • Directional Style

            • Outline Style
            • Cursor
            • Opacity
            • Visibility
            • z-Index

          Simple Scss Utilities


          Height

          Heights get the same utility classes as widths, and although not quite as useful, at least they're consistant.

          Height Rem Values

          These are useful enough when something needs an explicit height, usually there's a value in here that's pretty close. If you need another value, I'd just add it to the _variables.scss mapping so it can be a utility class. See more info about this file in the (customze)[/customize/] section. Like widths, all height classes also come with a min, or max prefix as well respond to the responsive breakpoints:

          ClassCSS rule
          .h-1height: 1rem;
          .h-2height: 2rem;
          .h-3height: 3rem;
          .h-4height: 4rem;
          .h-5height: 5rem;
          .h-6height: 6rem;
          .h-7height: 7rem;
          .h-8height: 8rem;
          .h-10height: 10rem;
          .h-12height: 12rem;
          .h-16height: 16rem;
          .h-20height: 20rem;
          .h-24height: 24rem;
          .h-30height: 30rem;
          .h-36height: 36rem;
          .h-42height: 42rem;
          .h-48height: 48rem;
          .h-56height: 56rem;
          .h-64height: 64rem;
          .h-72height: 72rem;
          .h-80height: 80rem;

          Examples

          I like these the most because they don't depend on the explicit height of the container. Usage is pretty straightforward:

          .h-4

          .h-4

          .h-4

          .h-4

          .h-4

          .h-24

          HTML
          <div class="display-flex items-end justify-around text-white h-24">
          <div class="w-4 h-4 pb-sm center-bottom sizing-border bg-blue">
          <p>.h-4</p>
          </div>
          <div class="w-4 h-8 pb-sm center-bottom sizing-border bg-blue">
          <p>.h-4</p>
          </div>
          <div class="w-4 h-12 pb-sm center-bottom sizing-border bg-blue">
          <p>.h-4</p>
          </div>
          <div class="w-4 h-16 pb-sm center-bottom sizing-border bg-blue">
          <p>.h-4</p>
          </div>
          <div class="w-4 h-20 pb-sm center-bottom sizing-border bg-blue">
          <p>.h-4</p>
          </div>
          <div class="w-4 h-24 pb-sm center-bottom sizing-border bg-blue">
          <p>.h-24</p>
          </div>
          </div>

          Min, max, and Responsive examples

          Every width value can be prefixed with min-, max-, and responsive prefixes:

          .h-16

          .max-h-4

          .h-4

          .min-h-8

          .h-4

          .tab:h-8

          .scr:h-12

          .lg:h-16

          .max-scr:h-12

          .h-20

          In the first example, the div has a class of .h-16 but the .max-h-4 class limits it to the max-height. The second div has .h-4 but the .min-h-8 class liminits the mininmum height to 8 rem. The third div changes heights according to the tab, scr, and lg default breakpoints, and the fourth div has a height of 12 rem up until the max: breakpoint, where it then jumps to 20 rem.

          HTML
          <div class="display-flex items-end justify-around text-white h-20 mb-xl">
          <div class="w-6 h-16 max-h-4 pb-sm flex-col center-end sizing-border bg-blue">
          <p>.h-16</p>
          <p>.max-h-4</p>
          </div>
          <div class="w-6 h-4 min-h-8 pb-sm flex-col center-end sizing-border bg-blue">
          <p>.h-4</p>
          <p>.min-h-8</p>
          </div>
          <div
          class="w-6 h-4 tab:h-8 scr:h-12 lg:h-16 pb-sm flex-col center-end sizing-border bg-blue"
          >
          <p>.h-4</p>
          <p>.tab:h-8</p>
          <p>.scr:h-12</p>
          <p>.lg:h-16</p>
          </div>
          <div
          class="w-8 h-20 max-scr:h-12 pb-sm flex-col center-end sizing-border bg-blue"
          >
          <p>.max-scr:h-12</p>
          <p>.h-20</p>
          </div>
          </div>

          Height Percentage Values

          With height, the parent elements have to have a well-defined height for percents to work. So, if your percents aren't working, make sure the browser can give the parent element some type of well-defined height!

          .h-1/5

          .h-1/4

          .h-1/3

          .h-1/2

          .h-7/10

          .h-19/20

          HTML
          <div class="display-flex items-baseline justify-around text-white h-24">
          <div
          class="w-4 h-24 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div class="w-4 h-1/5 pb-sm pb-s flex-col center-end sizing-border bg-blue">
          <p class="text-white">.h-1/5</p>
          </div>
          </div>
          <div
          class="w-4 h-24 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div class="w-4 h-1/4 pb-sm pb-s flex-col center-end sizing-border bg-blue">
          <p class="text-white">.h-1/4</p>
          </div>
          </div>
          <div
          class="w-4 h-24 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div class="w-4 h-1/3 pb-sm pb-s flex-col center-end sizing-border bg-blue">
          <p class="text-white">.h-1/3</p>
          </div>
          </div>
          <div
          class="w-4 h-24 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div class="w-4 h-1/2 pb-sm pb-s flex-col center-end sizing-border bg-blue">
          <p class="text-white">.h-1/2</p>
          </div>
          </div>
          <div
          class="w-4 h-24 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div
          class="w-4 h-7/10 pb-sm pb-s flex-col center-end sizing-border bg-blue"
          >
          <p class="text-white">.h-7/10</p>
          </div>
          </div>
          <div
          class="w-4 h-24 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div
          class="w-4 h-19/20 pb-sm pb-s flex-col center-end sizing-border bg-blue"
          >
          <p class="text-white">.h-19/20</p>
          </div>
          </div>
          </div>

          Min, max, and Responsive examples

          .h-1/2

          .max-h-1/5

          .h-1/5

          .min-h-1/2

          .h-1/4

          .tab:h-1/3

          .scr:h-2/3

          .lg:h-4/5

          .h-2/3

          .max-scr:h-1/3

          Like the Rem height example, here the first div's h-1/2 class is overridden by max-h-1/5, the 2nd div's h-1/2 class is overridden by .min-h-1/2 class, as you can see in the html below. The 3rd dive has responslive classes for all the breakpoints, and you can resize the window if you're in a browser. The 4th div has a height of 1/3 up to the max-scr 1024px breakpoint, where it then jumps to 2/3.

          HTML
          <div class="display-flex items-end justify-around h-20 mb-xl">
          <div
          class="w-6 h-16 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div
          class="w-6 h-1/2 max-h-1/5 text-white
          pb-sm flex-col center-end sizing-border bg-blue"
          >
          <p>.h-1/2</p>
          <p>.max-h-1/5</p>
          </div>
          </div>
          <div
          class="w-6 h-16 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div
          class="w-6 h-1/5 min-h-1/2 text-white
          pb-sm flex-col center-end sizing-border bg-blue"
          >
          <p>.h-1/5</p>
          <p>.min-h-1/2</p>
          </div>
          </div>
          <div
          class="w-6 h-16 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div
          class="w-6 h-1/4 tab:h-1/3 scr:h-2/3 lg:h-4/5
          text-white pb-sm flex-col center-end sizing-border bg-blue"
          >
          <p>.h-1/4</p>
          <p>.tab:h-1/3</p>
          <p>.scr:h-2/3</p>
          <p>.lg:h-4/5</p>
          </div>
          </div>
          <div
          class="w-6 h-16 flex-col center-end
          bg-background-dkr border-lg border-dark-mode-only-ltr border-dashed"
          >
          <div
          class="w-6 h-2/3 max-scr:h-1/3 text-white
          pb-sm flex-col center-end sizing-border bg-blue"
          >
          <p>.h-2/3</p>
          <p class="w-5">.max-scr:h-1/3</p>
          </div>
          </div>
          </div>

          Screen Based Heights

          Like widths, there are utiltiy classes for screen based heights. Like the other values, you can also use max, min, and responsive breakpoints.

          ClassCSS rule
          .h-1/4-screenheight: 25vh;
          .h-1/3-screenheight: 33vh
          .h-1/2-screenheight: 50vh;
          .h-screenheight: 100vw;

          Just a single example is probably ok. This single dive will be 1/4 the height of whatever your screen is:

          .h-1/4-screen

          After the lengthy examples above it feels good to do a short and quick example:

          HTML
          <div className="center">
          <div className="center-bottom w-1/4-screen h-1/4-screen bg-blue pb-sm">
          <p className="text-white">.h-1/4-screen</p>
          </div>
          </div>

          XS - XL Heights

          And like widths, heights also have the same classes xs-xl that work for paddings and margins. They also work with all the min-, max- and responsive prefixes. I don't know how useful they are, but I threw 'em in anyway:

          ClassCSS rule
          .h-xxsheight: 0.125rem;
          .h-xsheight: 0.25rem;
          .h-smheight: 0.5rem;
          .h-mdheight: 0.75rem;
          .h-baseheight: 1rem;
          .h-lgheight: 1.25rem;
          .h-xlheight: 1.5rem;
          .h-2xlheight: 2rem;
          .h-3xlheight: 3rem;
          .h-4xlheight: 4rem;
          .h-5xlheight: 5rem;

          They're pretty straight forward to use. Here's a little div with a height of 3xl..of course these classses were made for margins and paddings, and when it comes to heights it doesn't look very extra large .. but hey, it is what it is.

          .h-3xl

          Here's the HTML:

          HTML
          <div className="center mb-lg">
          <div className="center-bottom w-4 h-3xl bg-blue pb-sm sizing-border">
          <p className="text-white">.h-3xl</p>
          </div>
          </div>

          That does it for heights examples. Happy Coding!

          © 2025 Simple Scss Utilities