Session Recording#

You’ll need to be signed in to your New School account to see this recording in-page! Safari prevents Google Drive embeds—so you’ll need to go to the original! ↗

Flexbox!#

For our first topic today, we’ll get into some more modern CSS layout:

Finally, Flexbox

Grid!#

And for our second, we’ll take a look its spiritual continuation in grid:

And (CSS) Grid

Working in Pairs#

In our back half, we’ll demonstrate how you’ll work in code together⁠—so please sit with your partner!

Our agenda:

  1. Head over to our new template repository in your browser:

    spread Template

  2. Click the green Use this template to create a new repo from it⁠—keeping the spread name, set to Public !

  3. Add your partner as another user (collaborator), which will let you both edit the repo’s code

  4. Clone the repo locally, create an index.html with some basic HTML structure, commit it, and push (as we did before)

  5. Back up on GitHub, enable Pages and the handy link in the repo’s About⚙ section and check the page is live

    Switch drivers!

  6. Now on the other computer, clone the repo down from GitHub

  7. Let’s make it responsive by adding our viewport meta tag

  8. Also add in our reset and create and link to a style.css

  9. Take a look at it in our friendly neighborhood DevTools Device Mode, at ~ 375px

  10. Start with some mobile-first styles! Use base CSS variables for colors, type size, spacing and a media query to make them responsive

  11. Commit this and push it up⁠—same as before!

    Switch drivers!

  12. Back on the first computer, pull down the changes

  13. Try a bit of our new layout here⁠—a flex column that switches to a row at larger breaks, variables for gap , etc.

  14. Add a @media print query and this special @page rule:

  15. Check this out in the Rendering tab, with the viewport set to 816px × 1056px (8.5 × 11" @ 96px /​inch)

    We’ll look at print stuff next week!

  16. …repeat until the project is done!

For Next Week#