Alfredo teaches web design & development (Like Building Blocks lecture)

Like Building Blocks

Lecture outline

More depth on styleguides, as well as thinking and building responsive structures online. Lecture slides will be made available on the day of the lecture (May 27).

GitHub Pages setup

Apologies for the delays!

We will be using GitHub Pages instead of SFU Filespace this term. If you haven't already, please follow this guide for set-up.

Let's do a quick review on how to complete the set-up.

Submission URLs

When submitting a web address to an assignment it should not start with https://github.sfu.ca/....

It should start with https://pages.github.sfu.ca/.

Notice the "pages" at the beginning! We will specify when to submit both or either URLs.

In preparation for lecture...

Please close up any laptops, cellphones, Switches, Neo Geo Pockets and other 'beep-boop' devices.

P1: Process

Code questions

Are there any spaces in the filenames?

/my project/AWSOME PROJECT FILE.HTML

https://www.sfu.ca/my%20project/AWSOME%20PROJECT%20FILE.HTML

Are pixel units used for font sizing?

p { font-size: 16px; /* << not responsive */ }
p { font-size: 1rem; /* << responsive */ }

word-break

CSS does not understand how to break-up long URLs by default. So we need to tell it that it is allowed to do so:

a.long-url {
word-break: break-word;
}
<a href="https://..." class="long-url">https://www.sfu.ca/super-long-url/this-needs/to_be_allowed/to_break/otherwise-it-will/break-responsiveness</a>

:focus and images

You cannot use the keyboard to navigate to an <img> element as they are not interactive elements. You will have to wrap it in an interactive element to style it upon interaction:

 a:focus img {
	/* this selects an img inside of a anchor that has focus */
}



Focus sampler
ah.link/rv
ah.link/validator

Validators

Options for checking semantics:

A stack of lego bricks

Like Building Blocks

An example of a search form including the search button and form field

How this breaks down 'atomically'

Style Guide Component

At minimum, each component in your style guide should include:

Show, Don't Tell

It is very important that when we start talking about brands, colours, layouts, (etc) that you show us what you intend.

"I'm thinking a sky blue" vs.

A stack of lego bricks

Just a bunch of blocks

An animated gif illustrating the differences between responsive and adaptive web design

From 9 Basic Principles of Responsive Web Design

Can I Use...
Flexbox

Flexbox

If you need support for flexbox, I recommend The Flexbox Cheatsheet Cheatsheet (Joni Trythall).

Grids

Grids help

If you need support for grids, I recommend A Complete Guide to Grid (CSS Tricks).

Flexbox or grids?

Do you want to let your content control the way it is displayed, on a row by row or column by column basis? That's flexbox.

Or, do you want to define a grid, and either allow items to be auto-placed into the cells defined by that grid, or control their positioning using line-based positioning or grid template areas. That's grid.

Rachel Andrew

An animated gif illustrating how breakpoints work

From 9 Basic Principles of Responsive Web Design

Media Queries with Flexbox
Media Queries with Grids

Break-time

Please make sure you have today's starter kit — available at short.alfredosherman.com/339-t03

This week's exercise

Bring P1 to next lecture

Please make sure to bring P1 to next week's lecture.

P1: Process

Next week

We will be covering git as part of next week's lecture. Please read the announcement for instructions.

Labs critique sign-up

Sign-up for critique times starts with your lab. You will need to make it in your lab by its start time to secure a time-slot.

Critiques will run starting 15 minutes after your lab start time.

Activities during critiques

Code review tools:

  1. Upload P1 to your SFU GitHub.
  2. Head to ah.link/tools to try out the:
    • Code check assistant
    • Responsive viewer
    • Advanced code validator (password: )
1/1