Open code, practice, and notes →
Download source with English comments · for reading
CSS · 28 Tokens and Rendering Observations
Series contents · Technology map
Stage: Motion, tokens, and rendering verification · Editable example · Storage ID: css-03
Goals and learning outcomes
- There are two performance recordings under identical conditions and observations for each stage.
- Document body text contrast and keyboard focus in both themes.
Prerequisites
The work and experiment records from Unit 27, “contain and Offscreen Content”
Key concepts and explanations
Design Decisions
Color and spacing tokens apply the same decisions across multiple elements. Preserve text contrast and distinguishable states even when switching themes.
Evidence-Based Adjustments
Judge performance improvements using actual layout and paint recordings. Do not directly compare results with different element counts and speeds.
Practice setup
Frontory's existing preview is a limited starter example, not a complete solution to the assignment. Implement additional files and features yourself in a separate local project. In a separate folder, create the content in index.html and connect the practice CSS using link rel="stylesheet". Check the viewport, computed styles, and performance recordings in developer tools.
The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.
Practice tasks
- In index.html, prepare content with 50 cards, a 500ms transition, and light/dark themes, and connect theme-report.css.
- Complete two token-based themes, record width·transform transitions under the same conditions, and compare them in report.md.
- Run with 50 cards, a 500ms transition, and light/dark themes. Results to check: There are two performance recordings under identical conditions and observations for each stage. Document body text contrast and keyboard focus in both themes. Record expected and actual results separately.
Variables to observe
| Variable | Baseline | Change | Expected change / hypothesis |
|---|---|---|---|
| Element Count | 50 elements | 200 elements | Hypothesis before running: Rendering work may increase, and differences between paths must be checked through measurement. Keep the other conditions fixed and record the actual result separately after running. |
Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.
Completion criteria
- There are two performance recordings under identical conditions and observations for each stage.
- Document body text contrast and keyboard focus in both themes.
Self-check
- Which intervals support the optimization conclusion?
- Did any adjustment sacrifice maintainability or accessibility?
Official references
Linked example and execution scope
Example source · Runtime environments and limits
Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.