concept

Motion capstone — CSS reference

Motion capstone checklist: keep state changes functional without animation, choose meaningful transitions, and test reduced motion separately. This example changes a real expanded state through a native button, with a transition as enhancement. The exercise and complete project remain pending.

Formal Syntax & Structure

css syntaxcss
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>motion-capstone</title><style>body{margin:8px;font:16px/1.5 sans-serif}*{box-sizing:border-box}#a{width:100px;transition:width .2s}#a.open{width:200px}@media(prefers-reduced-motion:reduce){#a{transition:none}}</style><body><button id="toggle" aria-expanded="false" aria-controls="a">Expand</button><div id="a">Details</div><script>document.getElementById("toggle").onclick=e=>{const open=document.getElementById("a").classList.toggle("open");e.currentTarget.setAttribute("aria-expanded",String(open))}</script></body></html>
CSS Reference