Skip to content

Lab introducing students to CSS transitions.

onja-org/w2_css_intro_to_transition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS Transitions Lab - Week 2

Transform static interfaces into smooth, interactive experiences!

Overview

Welcome to your journey into CSS transitions! This comprehensive lab will teach you how professional websites create those smooth, polished interactions that make users feel delighted rather than jarred by sudden changes.

This lab is designed as a progressive learning experience with 7 hands-on playgrounds that build from basic concepts to advanced interaction patterns. You'll master the transition property while practicing with state selectors, timing functions, and various CSS properties.

What You'll Learn

  • CSS Transition Fundamentals: Property syntax, timing, and best practices
  • State Selectors: :hover, :active, :focus and when to use each
  • Transform Functions: translate, scale, rotate for dynamic effects
  • Timing Functions: Natural motion with ease, ease-in-out, and more
  • Professional Patterns: Real-world interaction design techniques
  • Performance Considerations: Smooth animations that don't impact user experience

Lab Structure

🎯 Learning Progression

Stage 1 (Playgrounds 1-2): Guided Discovery

  • Detailed explanatory comments teach you the "why" behind concepts
  • Step-by-step instructions with specific tasks
  • Strong focus on understanding state selectors and transition basics

Stage 2 (Playgrounds 3-4): Problem-Solving with Context

  • Real-world problems for you to solve with guided hints
  • Exploration of multiple CSS properties through transitions
  • Creative challenges that build confidence

Stage 3 (Playgrounds 5-7): Creative Architecture

  • Professional scenarios where you design the complete interaction
  • Multiple approaches to choose from
  • Real-world complexity with scaffolding support

🚀 The 7 Playgrounds

  1. Responsive Button - Master state selectors and basic transitions
  2. Form Input Highlights - Focus states and accessibility-friendly design
  3. Interactive Cards - Multi-property transitions and elevation effects
  4. Rainbow Cascade - Transition delays and coordinated timing
  5. Pricing Card Selection - Complex state management and visual feedback
  6. Interactive Image Gallery - Advanced transforms and performance
  7. Toast Notification System - Professional interaction patterns

Getting Started

  1. Navigate to the lab/ directory
  2. Open index.html in your browser
  3. Work through playgrounds in numerical order
  4. Read the detailed instructions in lab/README.md
  5. Run npm test to check if your task pass

Time Commitment

  • Total Time: ~3 hours (including experimentation and breaks)
  • Per Playground: 25-35 minutes
  • Difficulty: Beginner-friendly with guided progression to intermediate concepts
  • Prerequisites: Basic CSS knowledge (selectors, properties, values)

Key Concepts Reference

Transition Syntax

.element {
  /* Basic syntax */
  transition: property duration timing-function delay;
  
  /* Examples */
  transition: all 0.3s ease;
  transition: background-color 0.2s ease-out;
  transition: transform 0.4s ease-in-out 0.1s;
}

Common State Selectors

.button:hover { /* mouse over */ }
.button:active { /* being clicked */ }
.button:focus { /* keyboard focused */ }

Transform Functions

  • translateX(20px) - move horizontally
  • translateY(-10px) - move vertically
  • scale(1.1) - make larger/smaller
  • rotate(5deg) - rotate around center

Directory Structure

├── README.md (this file)
├── assets/
│   ├── intro_to_transition_1.gif
│   ├── intro_to_transition_2.gif
│   └── ... (demo gifs for each playground)
└── lab/
    ├── index.html
    ├── README.md (detailed lab instructions)
    ├── css/
    │   ├── playground-1-responsive-button.css
    │   ├── playground-2-form-highlights.css
    │   └── ... (7 playground files)
    └── solutions/
        ├── index.html
        └── css/ (solution files)

Support

Having trouble? Check the lab/README.md for detailed troubleshooting tips, or review the solution files in the solutions/ directory for reference.


Remember: Every professional web developer started exactly where you are now. These transitions will become second nature with practice - enjoy the journey of making the web more delightful! ⚡

About

Lab introducing students to CSS transitions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •