← All topics
Quiz: CSS Variables and Animations: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. How do you read a custom property called --brand?
- Q2. What does color: var(--accent, orange); do if --accent is not defined?
- Q3. What is a key difference between CSS custom properties and Sass variables?
- Q4. Which media query lets a site follow the operating system's dark mode setting?
- Q5. In transition: transform 200ms ease-out 50ms; what is 50ms?
- Q6. Which timing function starts fast and slows down at the end, good for elements entering the screen?
- Q7. Which pair of properties is cheapest for the browser to animate?
- Q8. What does animation: spin 0.8s linear infinite; do?
- Q9. A card uses transform: translateY(-4px) on hover. What happens to the cards next to it?
- Q10. Why add a prefers-reduced-motion: reduce media query?