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


          Transitions

          Make it smooth

          A natural followup to colors and pseudo classes is transitions.

          By default, the transition classes have the form transition-[speed] for all transition-[type]-[speed] for the other properties and the css is as follows:

          Transition Classes

          ClassCSS rule
          .transition-1stransition: all 1s ease-in-out;
          .transition-colors-1stransition: color 1s ease-in-out, background-color 1s ease-in-out, border-color 1s ease-in-out, text-decoration-color 1s ease-in-out, fill 1s ease-in-out, stroke 1s ease-in-out;
          .transition-opacity-1stransition: opacity 1s ease-in-out;
          .transition-shadow-1stransition: box-shadow 1s ease-in-out;
          .transition-transform-1stransition: transform 1s ease-in-out;
          .transition-slowtransition: all 700ms ease-in-out;
          .transition-colors-slowtransition: color 700ms ease-in-out, background-color 700ms ease-in-out, border-color 700ms ease-in-out, text-decoration-color 700ms ease-in-out, fill 700ms ease-in-out, stroke 700ms ease-in-out;
          .transition-opacity-slowtransition: opacity 700ms ease-in-out;
          .transition-shadow-slowtransition: transition: transform 700ms ease-in-out;
          .transition-transform-slowtransition: transform 700ms ease-in-out;
          .transition-medtransition: all 500ms ease-in-out;
          .transition-colors-medtransition: color 500ms ease-in-out, background-color 500ms ease-in-out, border-color 500ms ease-in-out, text-decoration-color 500ms ease-in-out, fill 500ms ease-in-out, stroke 500ms ease-in-out;
          .transition-opacity-medtransition: opacity 500ms ease-in-out;
          .transition-shadow-medtransition: box-shadow 500ms ease-in-out;
          .transition-transform-medtransition: transform 500ms ease-in-out;
          .transition-defaulttransition: all 300ms ease-in-out;
          .transition-colors-defaulttransition: color 300ms ease-in-out, background-color 300ms ease-in-out, border-color 300ms ease-in-out, text-decoration-color 300ms ease-in-out, fill 300ms ease-in-out, stroke 300ms ease-in-out;
          .transition-opacity-defaulttransition: opacity 300ms ease-in-out;
          .transition-shadow-defaulttransition: box-shadow 300ms ease-in-out;
          .transition-transform-defaulttransition: transform 300ms ease-in-out;
          .transition-fasttransition: all 150ms ease-in-out;
          .transition-colors-fasttransition: color 150ms ease-in-out, background-color 150ms ease-in-out, border-color 150ms ease-in-out, text-decoration-color 150ms ease-in-out, fill 150ms ease-in-out, stroke 150ms ease-in-out;
          .transition-opacity-fasttransition: opacity 150ms ease-in-out;
          .transition-shadow-fasttransition: box-shadow 150ms ease-in-out;
          .transition-transform-fasttransition: transform 150ms ease-in-out;

          Applying transition: all whenever a transition is needed can lead to unwanted janky side effects sometimes, so more specific classes targeting widely used properties are useful. I think these classes should cover the majority of use cases, and although the framework doesn't come with any transform classes, it might be helpful to still have transition classes that apply to transform.

          Transitions by default come in 5 flavors:

          • All
          • Colors
          • Opacity
          • Box Shadow
          • and Transform

          In addition to these classes, transitions also come in various speeds:

          • 1s (one second)
          • slow (700 ms)
          • med (500 ms)
          • default (300 ms)
          • and Fast (150 ms, my favorite)

          for a total of 25 different default classes.

          The transition function is always ease-in-out although this can be customized in the _variables.scss file as well as the names and times:

          File: _variables.scss
          $transition-function: ease-in-out; // change the function here
          // both the keys and values can be changed in this map as well:
          $transition-speeds: (
          "1s": 1s,
          "slow": 700ms,
          "med": 500ms,
          "default": 300ms,
          "fast": 150ms
          );

          Using Transitions with Pseudo Classes

          Transitions can make your pseudo classes nice and smooth. Let's take a look at a button with a bunch of :hover and :active classes as an exmaple. I use a transition-colors-default class to animate it smoothly, notice how all the various color properties transition when you hover and/or press the button:

          Here is the Html (I broke the color classes into seperate lines for readability):

          Html
          <button
          class="px-lg py-sm font-large text-xl radius-lg cursor-pointer border-md
          bg-green-ltr
          text-blue-dkr
          border-green-dk
          hover:bg-blue
          hover:text-white
          hover:border-white
          active:text-black
          active:bg-magenta
          active:border-black
          transition-colors-default"
          >
          Click Me, I'm a Button
          </button>

          Hopefully this provides a good overview of how to use the transition classes!

          © 2025 Simple Scss Utilities