Started

These are CSS custom properties (variables) used to control a simple animation named sd-fadeIn. Explanation and how to use them:

What they mean

  • –sd-animation: sd-fadeIn; name of the animation to apply.
  • –sd-duration: 250ms; how long the animation runs.
  • –sd-easing: ease-in; timing function controlling acceleration.

Example CSS (using variables)

css
:root {–sd-animation: sd-fadeIn;  –sd-duration: 250ms;  –sd-easing: ease-in;}
/* define keyframes /@keyframes sd-fadeIn {  from { opacity: 0; transform: translateY(8px); }  to   { opacity: 1; transform: translateY(0); }}
/ apply animation using the variables /.element {  animation-name: var(–sd-animation);  animation-duration: var(–sd-duration);  animation-timing-function: var(–sd-easing);  animation-fill-mode: both;  / optional shorthand: animation: var(–sd-animation) var(–sd-duration) var(–sd-easing) both; */}

Tweaks

  • Change –sd-duration to e.g., 400ms for slower effect.
  • Use –sd-easing: cubic-bezier(…) for custom easing.
  • Add –sd-delay: 100ms and use animation-delay: var(–sd-delay) to stagger items.
  • For hardware-accelerated transforms prefer translateY/translateZ and opacity; avoid animating top/left.

Compatibility

  • Works in modern browsers; add vendor-prefixed keyframes/animation properties only if you need older browser support.

Your email address will not be published. Required fields are marked *