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 usingauto-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.
-
Logical Properties and Writing Modes ⭐
Replace physical directions with logical ones so your layouts work naturally in both left-to-right and right-to-left contexts. -
Intrinsic Sizing Keywords
Usemin-content,max-content, andfit-content()to let content drive track and element sizing. -
Aspect Ratio and Object Fit in Layout
Control how images and media fill their containers usingaspect-ratioandobject-fitwithin grid and flex contexts. -
display: contentsand Layout Trees
Remove an element's box from the layout tree while keeping its children in flow, and understand when this technique is appropriate.
Assignments
-
Editorial Grid and Responsive Card Grid
Build an editorial page layout with named grid areas alongside a responsive card grid that adapts without breakpoints. -
Teaching Video Report
Complete your chosen topic report, download the PDF, and submit it to Canvas.
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
Usecqi,cqb, and style-based container queries to create components that respond to their own context. -
min-width: 0on 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
-
Subgrid, Container Queries, and Sticky
Combine subgrid alignment, container-responsive components, and sticky positioning in a cohesive layout. -
Teaching Video Report
Complete your chosen topic report, download the PDF, and submit it to Canvas. -
Design Review: Layout and Responsiveness
Present your layout system and responsive strategies for peer and instructor feedback.