Those are CSS custom properties (CSS variables) likely used by a design system or component library to control a small animation. Breakdown:
- -sd-animation: sd-fadeIn;
- Specifies which animation to apply (here a named animation “sd-fadeIn”).
- –sd-duration: 250ms;
- Controls the animation duration: 250 milliseconds.
- –sd-easing: ease-in;
- Sets the timing function/transition curve: “ease-in” (slow start, faster end).
How they’re typically used in CSS:
- Defined on an element (or :root) as variables, then consumed in animation rules:
.component {–sd-animation: sd-fadeIn; –sd-duration: 250ms; –sd-easing: ease-in; animation-name: var(–sd-animation); animation-duration: var(–sd-duration); animation-timing-function: var(–sd-easing); animation-fill-mode: both;} @keyframes sd-fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); }}
Notes and tips:
- Prefix style: one property uses single dash (-sd-) and others use double (–sd-). Standard custom properties must start with –; a single-dash name is not a valid CSS custom property and might be a regular property or a typo. If intended as a variable, change to –sd-animation.
- animation-fill-mode: both or forwards keeps end state visible.
- Consider prefers-reduced-motion: set duration to 0 or remove animation for accessibility.
Leave a Reply