{
"$schema": "../schemas/code-crispies-module-schema.json",
"id": "grid",
"title": "CSS Grid",
"description": "Master the grid layout system for complex two-dimensional layouts",
"difficulty": "intermediate",
"lessons": [
{
"id": "grid-1",
"title": "Grid Container",
"description": "CSS Grid is a two-dimensional layout system, meaning it can handle both columns AND rows simultaneously. While Flexbox excels at one-dimensional layouts (a single row or column), Grid shines when you need precise control over both dimensions.
How it works: Set display: grid on a container. Then define your column structure with grid-template-columns. The fr unit represents a fraction of available space.
Key properties:
• grid-template-columns – Defines column sizes
• repeat(3, 1fr) – Creates 3 equal columns
• gap – Adds spacing between grid cells
.grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 1rem;\n}",
"task": "Add display: grid, grid-template-columns: repeat(3, 1fr), and gap: 1rem to .grid.",
"previewHTML": "