OCS Grid Grammar

The finished OCS Grids lesson hacks are below. Click Run on each labeled UI runner to preview the layout. The OCS grid classes come from the portfolio’s SASS.

Popcorn Hack 1: Refactor the Beakers

All three beakers share one standard OCS grid, and each beaker is an ocs__grid-cell.

Challenge

Popcorn Hack 1 — Three OCS Beakers

Lines: 1 Characters: 0
UI Output

Popcorn Hack 2: Size the Control Beaker

Four fr values create four columns in one row, and the final 2fr makes the Control Beaker twice as wide as any other column. The lesson explicitly allows a grid-template-columns style for this fr hack.

Challenge

Popcorn Hack 2 — Control Beaker Twice as Wide

Lines: 1 Characters: 0
UI Output

MCQ Check

  1. A — cols-4 adds four columns to a standard OCS grid.
  2. B — Two boxes; the first is twice as wide. 2fr 1fr gives two columns in a 2:1 ratio.
  3. C — ocs__grid-cell--header is the cell that spans the full grid row.
  4. D — <div class="my-row" style="display:flex"> breaks the lesson’s OCS-only class rule.

MCQ Grids: 4/4 | answers: A,B,C,D

Homework Hack: Temperature Trial and Calculator

Click Run to check the editable code and preview both grids. The runner reports PASS or FIX for each lesson rule. The temperature title is a header cell spanning the standard grid, Beaker 3 is accented as the outlier, and the calculator’s Avg key is accented.

Challenge

Homework Hack — Temperature and Calculator Grids with Live Checks

Lines: 1 Characters: 0
UI Output