Give #box the view transition name card.
Acceptance criteria
- 1.Give #box the view transition name card.
CSS Tutorial · CSS Animations & Transitions
These 10 tasks go with the View Transitions chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “Create coordinated transitions between page states and documents with named snapshots and view-transition pseudo-elements. You will name transition participants, style snapshot pseudo-elements, enable document navigation, and account for reduced motion.” .
1.Name a transitioned elementexercise · easy · 10 min
Give #box the view transition name card.
Passes when: Give #box the view transition name card.
2.Name a second elementexercise · easy · 10 min · practice plan
Give #text the view transition name hero.
Passes when: Give #text the view transition name hero.
3.Use unique namesexercise · easy · 10 min · practice plan
Name #box card and #text hero — every name must be unique.
Passes when: Name #box card and #text hero — every name must be unique.
4.Tune the durationexercise · easy · 10 min · practice plan
Name #box card and run its animation over 0.4s.
Passes when: Name #box card and run its animation over 0.4s.
5.Tune the easing tooexercise · medium · 10 min · practice plan
Name it, set a 0.4s duration and ease-in-out easing.
Passes when: Name it, set a 0.4s duration and ease-in-out easing.
6.Fix the name with a spacebug fix · easy · 8 min
A view transition name is a single identifier.
Passes when: A view transition name is a single identifier.
7.Fix the duplicated namebug fix · easy · 8 min · practice plan
Two elements cannot share one view transition name.
Passes when: Two elements cannot share one view transition name.
8.Fix the misspelled propertybug fix · easy · 8 min · practice plan
The property is view-transition-name.
Passes when: The property is view-transition-name.
9.Fix the duration with no unitbug fix · easy · 8 min · practice plan
A duration needs s or ms.
Passes when: A duration needs s or ms.
10.Fix the name on the wrong elementbug fix · easy · 8 min · practice plan
The card name belongs on #box.
Passes when: The card name belongs on #box.
Between them these tasks cover view-transition-name, Pairing elements across views and Tuning the animation.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.