Modern, adaptive CSS
Styles that respond to state and to the device, values that are shared through variables, motion that respects people, and habits that keep a stylesheet healthy as it grows.
About 6 hours of study
Learning objectives
- Style states for mouse and keyboard users
- Make a page adapt to any screen
- Organise large stylesheets
Lessons
- 1
Pseudo-classes and pseudo-elements Intermediate
Style elements by their state and position, such as hover, focus and every second row, and add decorative content without touching the HTML.
- 2
Custom properties (CSS variables) Intermediate
Store values in one place, understand how variables inherit and can be overridden in a section of the page, and build a theme that switches instantly.
- 3
Responsive design basics Intermediate
Make one page work on every screen with the viewport tag, fluid images, mobile-first media queries and sizes that scale smoothly.
- 4
Transitions, transforms and animations Intermediate
Move and fade elements smoothly, understand which properties are cheap to animate, and make sure motion never harms the people using your page.
- 5
Keeping CSS maintainable Advanced
A sensible reset, class naming that scales, cascade layers for controlling order, nesting, and how to debug styles with your browser's own tools.
Module practice
- Hover and focus togetherEasy
- A striped table with a clean listMedium
- Decoration and parent selectionHard
- One colour in one placeEasy
- Override a variable for a sectionMedium
- A theme you can switch with one attributeHard
- Stop images from overflowingEasy
- A mobile-first layoutMedium
- Layouts and text that adapt with no queriesHard
- A smooth colour changeEasy
- A card that liftsMedium
- A loading spinner that respects your visitorsHard
- A small resetEasy
- Rename to BEMMedium
- Control priority with layersHard