Learn about some basic browser and device properties, and design strategies for web content:
@media
and @support
queries
See the Pen Containing blocks and position properties by Chris Lindgren (@lndgrn) on CodePen.
If responsive, use meta viewport tag:
<head> ... <meta name="viewport" content="width=device-width, initial-scale=1"> ... </head>
Answer: The equivalent of the size of paper you use, i.e., the physical constraints of your canvas.
Device | Breakpoints |
---|---|
iPhone 5/5s (portrait) | 320x568px |
iPhone 5/5s (landscape) | 568x320px |
iPad Pro (portrait) | 1024x1366px |
iPad Pro (landscape) | 1366×1024px |
Samsung Galaxy S5 (portrait) | 360×540px |
Samsung Galaxy S5 (landscape) | 540×360px |
Check out UXPIN's breakpoint cheatsheet.
To-be discussed next time, but here's a preview:
@media
queries
@media (min-height: 500px) { header img { width: 100%; } }
@support
feature queries. (Read Simmons.)
@supports (display: grid) { // Only applied if browser supports CSS Grid }
Plan out your HTML structure, design, and its content: