Color scheme

Meaningful Motion with Reduced-Motion Support

You have learned how transitions animate state changes, how @keyframes gives you full control over multi-step motion, and why prefers-reduced-motion is a non-negotiable part of any animation you ship. This assignment asks you to prove all three skills on a single self-contained page.

You will be given an HTML file for a simple activity dashboard. It has navigation links, action buttons, a status badge, and a set of content cards. Your job is to write the CSS that makes the interactive elements respond with transitions, gives the status badge a purposeful keyframe animation, and wraps everything in a prefers-reduced-motion guard so users who need it get a safe experience.

Preparation

Create a new directory at unit-6/motion/ in your portfolio. Inside it you will create two files: the HTML page and a local stylesheet. The page links to your shared css/main.css for tokens and base styles, and to its own local stylesheet for all motion-related CSS you write in this assignment.

The required live shared sheet is css/main.css. If you are keeping a bundler, follow After This Assignment: Stop or Keep.


    [portfolio]
    ├── unit-6/
    │   └── motion/
    │       ├── index.html      # New
    │       └── motion.css      # New
    ├── index.html              # Update: Add Links
    └── README.md               # Update: Pages

Assignment Instructions

1. Copy the Provided HTML

Copy the markup below into unit-6/motion/index.html. Do not modify the HTML structure, the class names, or the element order. All of your work happens in motion.css.


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Activity Dashboard</title>
        <link rel="stylesheet" href="../../css/main.css">
        <link rel="stylesheet" href="motion.css">
    </head>
    <body>

        <header class="site-header">
            <span class="site-name">portfolio</span>
            <nav>
                <a href="#">Home</a>
                <a href="#">Projects</a>
                <a href="#">About</a>
                <a href="#" class="nav-cta">Contact</a>
            </nav>
        </header>

        <main>

            <section class="dashboard-header">
                <div>
                    <h1>Activity Dashboard</h1>
                    <p>Your work at a glance.</p>
                </div>
                <div class="status">
                    <span class="status-badge">Live</span>
                    <span class="status-label">All systems operational</span>
                </div>
            </section>

            <section class="actions">
                <button class="btn btn-primary" type="button">New Project</button>
                <button class="btn btn-secondary" type="button">View Archive</button>
                <button class="btn btn-ghost" type="button">Export Data</button>
            </section>

            <section class="card-grid">

                <article class="card">
                    <div class="card-header">
                        <h2>Design Tokens</h2>
                        <span class="card-tag">Complete</span>
                    </div>
                    <p>Color, spacing, and type tokens organized into a token-first architecture with dark mode support.</p>
                    <a href="#" class="card-link">View work &rarr;</a>
                </article>

                <article class="card">
                    <div class="card-header">
                        <h2>Grid Layouts</h2>
                        <span class="card-tag">Complete</span>
                    </div>
                    <p>Editorial layout with named grid areas and a responsive auto-fit card grid that adapts without breakpoints.</p>
                    <a href="#" class="card-link">View work &rarr;</a>
                </article>

                <article class="card">
                    <div class="card-header">
                        <h2>Type Scale</h2>
                        <span class="card-tag">Complete</span>
                    </div>
                    <p>Fluid typography using clamp() and a modular scale with web fonts loaded for performance.</p>
                    <a href="#" class="card-link">View work &rarr;</a>
                </article>

                <article class="card">
                    <div class="card-header">
                        <h2>Motion</h2>
                        <span class="card-tag card-tag--active">In Progress</span>
                    </div>
                    <p>Transitions, keyframe animations, and reduced-motion support applied across the portfolio.</p>
                    <a href="#" class="card-link">View work &rarr;</a>
                </article>

                <article class="card">
                    <div class="card-header">
                        <h2>SVG Icons</h2>
                        <span class="card-tag card-tag--pending">Up Next</span>
                    </div>
                    <p>Accessible SVG sprite system using symbol and use with currentColor theming.</p>
                    <a href="#" class="card-link">View work &rarr;</a>
                </article>

                <article class="card">
                    <div class="card-header">
                        <h2>Portfolio</h2>
                        <span class="card-tag card-tag--pending">Up Next</span>
                    </div>
                    <p>Capstone project showcasing the full toolkit built throughout this course.</p>
                    <a href="#" class="card-link">View work &rarr;</a>
                </article>

            </section>

        </main>

    </body>
    </html>

2. Add Transitions to Interactive Elements

In motion.css, write transitions for the page's interactive elements. Every transition must name its properties explicitly. Do not use transition: all anywhere in this file.

At minimum, transitions must cover these three groups:

  • Navigation links: The nav a and .nav-cta elements should respond visually to :hover and :focus-visible. What changes (color, background, border, transform) is your design decision. Choose an easing curve that fits the feel of each element: a bare link behaves differently from a CTA button.
  • Buttons: The three .btn variants (.btn-primary, .btn-secondary, .btn-ghost) each have their own visual weight. Their hover and focus transitions should reflect that weight: a primary button can afford a more dramatic change than a ghost button.
  • Cards: The .card elements should respond to hover with a subtle lift or emphasis. The .card-link inside each card should also transition independently. Think about which properties communicate interactivity without overpowering the card's content.
Forward and Reverse Timing

Consider giving your hover transitions different timings for entering and leaving the state. A fast in and slightly slower out often feels more natural than symmetrical timing. You do this by placing a second transition declaration on the :hover rule, which overrides only while the hover is active.

3. Write a Purposeful Keyframe Animation

The .status-badge element in the dashboard header indicates that all systems are operational. It needs a keyframe animation that draws attention to it in a way that communicates active status, not decorative flair. A subtle, continuous pulse is appropriate. A spinning badge or a flashing effect is not.

Write a @keyframes rule and apply it to .status-badge. Your animation must:

  • Use only compositor-friendly properties (transform or opacity, or both).
  • Loop indefinitely using animation-iteration-count: infinite.
  • Use animation-direction: alternate so the loop reverses smoothly without snapping.
  • Use an easing that makes the pulse feel organic rather than mechanical. ease-in-out is a reasonable starting point.
Infinite Animations and Accessibility

Any infinite animation is a high-priority target for prefers-reduced-motion handling. Users with vestibular disorders may have this preference set, and a looping animation that runs for the lifetime of a page visit is exactly the kind of motion that causes symptoms. Your reduced-motion implementation in the next step must address this animation specifically.

4. Implement prefers-reduced-motion

Add a prefers-reduced-motion block that guards everything you wrote in steps 2 and 3. You have two equally valid approaches: write all your motion inside a @media (prefers-reduced-motion: no-preference) block so it only applies when the user has not opted out, or write the motion normally and override it inside a @media (prefers-reduced-motion: reduce) block. Pick one and use it consistently throughout motion.css.

For the .status-badge animation specifically, do not simply remove the animation and leave nothing behind. The badge communicates live status. Provide a reduced alternative that still conveys active state without the continuous motion: a slower opacity fade, a one-time entrance, or a static visual treatment that reads as intentional rather than broken.

When you are done, test your implementation. In Chrome DevTools, open the Rendering panel (three-dot menu in the Console → More tools → Rendering) and check the "Emulate CSS media feature prefers-reduced-motion" option to simulate the reduce preference without changing your OS setting. Verify that all transitions and your keyframe animation are affected as expected.

5. Apply Your Choose Topic (If Applicable)

If you studied one of the Unit 6A choose topics, apply at least one technique from it on this page:

  • Animation Choreography and Custom Easing: Replace the ease-in-out on the status badge with a custom cubic-bezier() curve. Stagger the card entrance with animation-delay offsets using :nth-child().
  • @starting-style and Display Transitions: Apply @starting-style to give the cards an entrance transition from their initial render state.
  • Scroll-Driven Animations: Tie the card entrance animation to scroll position using animation-timeline: view() so cards animate in as they enter the viewport.
  • GSAP: Replace your card entrance animation with a GSAP timeline that staggers the cards on page load.
  • Motion Path: Animate a decorative element along a path in the dashboard header using offset-path.
  • View Transitions API: Wrap a simulated navigation event on the page with a view transition so the content change animates smoothly.

If you did not study a choose topic for this unit, skip this step.

6. Update Your Homepage and README

Add a link to unit-6/motion/index.html on your portfolio homepage so it appears alongside your other completed assignments. Update your README.md under the Pages section with an entry for this page, following the same markdown list pattern from previous assignments.

7. Commit and Verify

Commit your work with a descriptive message, push to GitHub, and verify the page loads correctly on your live site. Check that transitions fire on hover and focus, that the status badge animates, and that toggling the reduced-motion emulation in DevTools visibly changes the behavior.

Submission

Complete the report below with your site details and reflections. When you are finished, download the PDF and submit it to Canvas.

Meaningful Motion Report
Site Details

My live motion page is at and the source code is at .

Reflection

Write a thoughtful response to each prompt. These are not summaries of what you did. They ask you to reason about why your motion choices work the way they do and what would change if you had made different decisions.

Transitions and Easing

Pick one interactive group on your page: navigation links, buttons, or cards. Defend your easing curve and which properties you chose to transition. If you used different hover-in versus hover-out timing on any element, explain the effect that created. What would feel wrong if you had used linear or transition: all instead?

Keyframe Animation

Explain what your status badge animation communicates and why that fits live status without becoming decorative noise. Why do alternate direction and compositor-friendly properties matter for an infinite loop on this element?

Reduced Motion

Describe your prefers-reduced-motion guard pattern: did you use the reduce override or the no-preference containment approach, and why? What does the status badge do when reduced motion is active, and how did you verify that behavior in DevTools?