SASS Grids HW
Popcorn Hack 1 (In-Class): Fix the Beaker Row
The inline display: flex and the made-up box class are replaced with one ocs__grid, one standard variant, and three ocs__grid-cell boxes, one per beaker. No style attribute and no box class are left.
Challenge
Popcorn Hack 1: replace the inline style and the box class with OCS grid classes, then press Run.
Popcorn Hack 2 (In-Class): Size the Beakers with fr
All 4 beakers sit in one row and the Control Beaker is twice as wide as each of the others. Four boxes in a row means four fr values, and the Control Beaker (last) gets the bigger number: grid-template-columns: 1fr 1fr 1fr 2fr;. This is the one place the lesson allows a style.
Challenge
Popcorn Hack 2: change the fr values so all 4 beakers sit in one row and the Control Beaker is twice as wide.
MCQ Check
| # | Question | My answer |
|---|---|---|
| 1 | 4 boxes per row on a standard grid | A (cols-4) |
| 2 | 2fr 1fr |
B (2 boxes, the first twice as wide as the second) |
| 3 | Cell type that spans the whole row | C (ocs__grid-cell--header) |
| 4 | Line that breaks the lesson rule | D (<div class="my-row" style="display:flex">) |
| **MCQ Grids: 4/4 | answers: A,B,C,D** |
Homework Hack
Grid 1 is a standard grid: the title becomes a header cell and Beaker 3, the outlier, becomes an accent cell. Grid 2 is a calculator grid (a keypad for typing in beaker readings) and the Avg key becomes an accent cell. Every inline style and made-up class (my-row, title-box, sample-card, highlight, key, orange) is gone. The checklist at the top of the output should show PASS on every line.
Challenge
Homework Hack: fix both grids using only OCS classes. Press Run and keep going until every check says PASS.
Submission notes
Lesson: OCS Grid Grammar (SASS Grids)
MCQ Grids: 4/4 | answers: A,B,C,D
Popcorn 1: three beakers refactored to ocs__grid (yes)
Popcorn 2: fr values used = 1fr 1fr 1fr 2fr
Homework: every check shows PASS (yes)