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


          Display

          How to use

          The utility classes for display are pretty straightforward:

          ClassCSS rule
          .display-nonedisplay: none;
          .display-blockdisplay: block;
          .display-flexdisplay: flex;
          .display-inline-blockdisplay: inline-block;
          .display-inlinedisplay: inline;

          These can all be prefixed with the default responsive prefixe to change the display. Out of all of these, display: flex probably deserves it's own section the other four properties are pretty straightforward so I'll just give some quick examples here:

          Display None

          Display none of course hides content, and can be used with responsive classes like shown beneath. If you're on a browser you can change the screen width of the window to see the message change (you'll have to close the sidebar for the small widths):

          Mobile Size

          Tablet Size

          Screen Size

          Large Size

          The default breakpoints are eaxy to edit in _variables.scss see the (Customize)[/customze/] section for more details. However, this effect is acheived by switching display none with display block with the breakpoint prefixes like so:

          HTML
          <div class="center m-lg mb-xl">
          <p
          class="text-xl font-bold p-lg border-sm
          display-none max-mob:display-block"
          >
          Mobile Size
          </p>
          <p
          class="text-xl font-bold p-lg border-sm
          display-none tab:display-block scr:display-none"
          >
          Tablet Size
          </p>
          <p
          class="text-xl font-bold p-lg border-sm
          display-none scr:display-block lg:display-none"
          >
          Screen Size
          </p>
          <p
          class="text-xl font-bold p-lg border-sm
          display-none lg:display-block"
          >
          Large Size
          </p>
          </div>

          Display Block / Display Inline

          Display block and display inline basically determine if you want something to be inline, like this code-styled text, or a block like a new paragraph. I can't think of many useful examples of switching these responsively, but for demonstration, here's a series of span elements that are inline up to the max of the scr breakpoint (1024 px) and display block at widths larger:

          Below 1024px: Display Inline

          1024px and above: Display Block

          Span 1Span 2Span 3Span 4

          The HTML is pretty simple:

          HTML
          <div class="text-lg m-lg">
          <p class="display-none max-scr:display-block mb-xs">
          Below 1024px: Display Inline
          </p>
          <p class="display-none lg:display-block mb-xs">
          1024px and above: Display Block
          </p>
          <span class="max-scr:display-inline display-block p-md ">Span 1</span>
          <span class="max-scr:display-inline display-block p-md ">Span 2</span>
          <span class="max-scr:display-inline display-block p-md ">Span 3</span>
          <span class="max-scr:display-inline display-block p-md ">Span 4</span>
          </div>

          Display Inline-Block

          Display Block is like Display Inline except it lets you define widths and heights. Here are some spans with widths and heights set, however in the screen size and below they're display: inline and on large sizes they're display: inline-block:

          Below 1024px: Display Inline

          1024px and above: Display Inline Block

          Span 1

          Span 2

          Span 3

          Span 4

          And here's the HTML:

          HTML
          <div class="text-lg m-lg">
          <p class="display-none max-scr:display-block mb-xs">
          Below 1024px: Display Inline
          </p>
          <p class="display-none lg:display-block mb-xs">
          1024px and above: Display Inline Block
          </p>
          <span
          class="max-scr:display-inline
          display-inline-block w-6 h-6 p-md lg:border-sm">
          Span 1
          </span>
          <span
          class="max-scr:display-inline
          display-inline-block w-6 h-6 p-md lg:border-sm">
          Span 2
          </span>
          <span
          class="max-scr:display-inline
          display-inline-block w-6 h-6 p-md lg:border-sm">
          Span 3
          </span>
          <span
          class="max-scr:display-inline
          display-inline-block w-6 h-6 p-md lg:border-sm">
          Span 4
          </span>
          </div>

          The final display property is the almighty display: flex. For real, I was a self taugh coder, the first website I ever made was based on a completely table-based layout haha. I didn't use display: flex for so long, but when I finally figured it out it was soooo much better. I will be going over this property in the next section. Happy Coding!

          © 2025 Simple Scss Utilities