Color scheme

Unit 4: Layout Mastery

This unit takes your layout skills well beyond the basics. You will master CSS Grid with named areas, overlapping tracks, and auto-fit patterns, then move into subgrid alignment, container queries, advanced flex techniques, and sticky positioning to build responsive systems that hold up in real projects.

Part A: Grid Systems

Learn

  • Grid Areas and Named Lines
    Define grid layouts using named areas and explicit line names, and use overlapping placements for layered designs.
  • Responsive Grid Tracks
    Build fluid grids that adapt their column count automatically using auto-fit, minmax(), and intrinsic sizing guards.

Choose Topics

Choose Topics are a team activity. Your team divides the topics among its members so each person covers one. Smaller teams do not need to cover every topic, and larger teams should only double up when the list is shorter than the team. Work through your topic's learn page and record a short Teaching Video that teaches your teammates what you learned:

For your chosen topic, you are expected to create your own demo. You are welcome to include our demos in your video as well, but they should accompany your work, not stand in for it. Only rely on our demos as your sole demonstration if the page explicitly says so.

Assignments

Part B: Subgrid, Container Queries, Flex, and Sticky

Learn

  • Subgrid Alignment
    Inherit a parent grid's tracks in child elements so nested components stay aligned without duplicating sizing logic.
  • Containers, Flex, and Sticky
    Size components relative to their container instead of the viewport, apply advanced flex layouts, and use sticky positioning for persistent UI elements.

Choose Topics

Choose Topics are a team activity. Your team divides the topics among its members so each person covers one. Smaller teams do not need to cover every topic, and larger teams should only double up when the list is shorter than the team. Work through your topic's learn page and record a short Teaching Video that teaches your teammates what you learned:

For your chosen topic, you are expected to create your own demo. You are welcome to include our demos in your video as well, but they should accompany your work, not stand in for it. Only rely on our demos as your sole demonstration if the page explicitly says so.

  • Container Query Units and Style Queries
    Use cqi, cqb, and style-based container queries to create components that respond to their own context.
  • min-width: 0 on Flex Items
    Understand why flex items overflow their containers and how resetting the minimum width fixes common layout bugs.
  • Scroll Snap Carousel
    Build a smooth, native scroll-snapping carousel without JavaScript using CSS scroll snap properties.
  • Anchor Positioning
    Position elements relative to other elements on the page using the CSS anchor positioning API.
  • CSS Masonry Layout
    Explore the proposed masonry layout mode for CSS Grid and how it handles uneven content heights.

Assignments