Housekeeping
CPNT 260 Assignment 1 marks returned.
- Example Submission:
CPNT 260 Assignment 2 marks returned.
- Example Submission:
Daily Standup
In the same groups as last class
Each person takes a turn to answer the following questions:
- What did you do yesterday?
- What will you do today?
- Anything blocking your progress?
1. Splitting Styles and Review
Example Code
Activity: CSS Separation
- Take one of your projects with the most CSS.
- Split your stylesheet logically into multiple files, such as:
reset.csstypography.csslayout.css- etc
<link>to each of these files in yourindex.html.
2. Review: Inspecting the CSS Cascade
3. Media Queries
Materials
- MDN: Beginner’s guide to media queries
- Kevin Powell: How to Take the Right Approach to Responsive Web Design
Example Code
Activity: Changing background-color with a media query
To get you started on Today’s Achievement:
- Take an example of your own code from previous lessons in this course.
- Create a
min-widthmedia query at the end of your stylesheet and change thebackground-coloron Desktop screens.
Today's Achievement
min-width Media Query
Add a mobile-first media query to a project.
Instructions
- Take an example of your own code from previous lessons in this course.
- You may use this sample code for partial marks.
- Choose some styles within your project that you would like to show only on Desktop screens. For example, on Desktop:
- Show or hide an element;
- Make the font-size larger;
- Add a flexbox;
- Create a
min-widthmedia query at the end of your stylesheet and move your selected styles into it. - View your site on both mobile and desktop screen widths (you can do this in the Inspector).
- Does the design make sense to the user?
Marking Criteria
Full points will be awarded for media queries that:
- are practical;
- extend the examples given in class;
- show originality.
Lesson Prep
Reading list
- MDN: Beginner’s guide to media queries
- Kevin Powell: How to Take the Right Approach to Responsive Web Design
Watch List
- Kevin Powell: Are you writing responsive CSS the wrong way?

