Those are custom CSS properties (CSS variables) likely used by a design system or a component library to control an animation. Breakdown:
- -sd-animation: sd-fadeIn;
- Purpose: names the animation to run (here a predefined keyframe set called
sd-fadeIn).
- Purpose: names the animation to run (here a predefined keyframe set called
- –sd-duration: 250ms;
- Purpose: sets the animation duration to 250 milliseconds.
- –sd-easing: ease-in;
- Purpose: sets the animation timing function to
ease-in(slow start, faster end).
- Purpose: sets the animation timing function to
Example usage in CSS (consuming those variables):
css
.component {animation-name: var(–sd-animation); animation-duration: var(–sd-duration, 250ms); animation-timing-function: var(–sd-easing, ease-in); animation-fill-mode: both;}
You also need a matching @keyframes rule named sd-fadeIn, for example:
css
@keyframes sd-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); }}
Notes:
- The variables use a leading hyphen in one case (
-sd-animation) — valid but unconventional; prefer–sd-animationfor consistency.
Leave a Reply