SmileMath Playables

Grid Garden

Puzzle

Write CSS grid rules to water the carrots and spray the weeds in your garden.

Each level shows a garden laid out as a grid, with carrots that need water and, in some levels, weeds that need poison. You complete a short stylesheet so that the water covers exactly the carrots and the poison covers exactly the weeds. The garden updates as you type.

The 28 levels begin with grid-column-start and grid-column-end, then move through negative line numbers, the span keyword, the grid-column and grid-row shorthands, grid-area and order. The last group reshapes the grid itself with grid-template-columns, grid-template-rows and grid-template, using percentages, pixels, the repeat function and the fr unit. A treatment must match its plants in both position and size, so watering bare dirt does not pass.

How to play

Type CSS in the editor, then press Enter or click Next.

Tips

  • Grid lines are counted from 1 at the left edge, and a negative number counts from the right.
  • With span you give a width in columns instead of naming the line where the area ends.
  • The four numbers in grid-area go in the order row start, column start, row end, column end.

Credits

By Thomas Park · Original credits · Source: github.com

More Puzzle Playables

  • CSS Diner: Type CSS selectors to pick the right plates, apples and pickles off the table, learning selector syntax level by level.
  • Cats n Wires: Reconnect loose wires to rescue cats scattered through a strange world.
  • Elevator Saga: Write JavaScript to control a bank of elevators and move enough passengers to beat each challenge.
  • Lost in Firefly Forest: Collect riddles and track patterns in a dark forest that seems to loop back on itself.
  • VIM Master: Learn Vim motions and editing commands through short interactive lessons and challenges.
  • Midwinter Springtime: Compress and release springs to move blocks around a single snowy board. Each push changes where the next spring can send you.
  • Astray: Roll a metal ball through a 3D maze to the exit. Each level makes the maze bigger.
  • The Flames: Spread fire between pieces of wood while protecting the barrels you still need. Each of the ten rooms starts with a different arrangement.

All Playables