An introduction to responsive web design, with lots of examples, tools and frameworks.
My deck from a Responsive Web Design Workshop which included two walkthroughs on responsive web designs (not included in the deck because, well, you had to be there!)
http://mulley.ie/blog/2013/05/responsive-web-design-training-course/
2. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Who is
This Guy?
Web Designer for 15 years or so
Table-based layouts & spacer gifs
CSS changed all that
RWD is how the web was meant to be
woop.ie - iteration, modules, themes, templates
6. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Caveat
"[I do not] carry such information
in my mind since it is readily
available in books."
Albert Einstein, when asked what the speed of sound was
10. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
11. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Responsive web design
We can design for an optimal
viewing experience, but embed
standards-based technologies
into our designs to make them
not only more flexible, but more
adaptive to the media that
renders them / ETHAN MARCOTTE
13. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Definition
Responsive web design means
designing your website so that it
responds to your users
environment based on screen-
size, platform and orientation.
14. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Definition
It looks different and things
jiggle around, scale, re-order,
appear, and disappear so it works
well in your browser size or
whatever device you’re using to
view it...
15. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Advantages
• Easier to Manage
no mobile version, faster to
update, single URL for
Google, less to manage
• One site, many devices
• Respects your visitors
The best experience for their
device
16. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Key Components
• Fluid, proportion-based grids
% widths and em units, not fixed pixels
• Flexible images
width/height not fixed
• CSS3 Media Queries
@media rule
17. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
New Thinking
• Work on everything
Design for many sizes at once
• Clean design
reduce clutter, essential content only
• Design from the content out
Let content decide breakpoints
18. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
New Thinking
• Design is how it works
Not how it looks
• Less Graphic files
CSS gradients, font icons
• Keep learning
Responsive images? Polyfills?
19. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
*actually* from a non-linear, non-subjective
viewpoint - it's more like a big ball of wibbly
wobbly... time-y wimey... stuff.
“
”
20. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
21. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Key Components
• Fluid, proportion-based grids
% widths and em units, not fixed pixels
• Flexible images
width/height not fixed
• CSS3 Media Queries
@media rule
22. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Fluid Grids
Scales to the width of the browser / device
32. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries
Specific styles for certain sizes and ranges
33. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries External
< link rel="stylesheet" media="screen and
( max-width: 500px )" href="mobile.css" >
< link rel="stylesheet" media="screen and
( max-width: 800px )" href="tablet.css" >
< link rel="stylesheet" media="screen and
( min-width: 1000px )" href="desktop.css" >
34. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries Same file
@media screen and ( max-width: 500px )
@media screen and ( min-width: 800px )
@media screen and ( min-width: 500px ) and
( max-width: 800px )
35. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries Devices
@media ( -webkit-min-device-pixel-ratio: 2 ) ,
( min-resolution: 192dpi )
@media only screen and ( min-device-width:
768px ) and ( max-device-width: 1024px )
@media only screen and ( min-device-width:
768px ) and ( max-device-width: 1024px ) and
( orientation: landscape )
36. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries
@media screen and ( min-width: 500px ) and
( max-width: 800px ) {
/* CSS declarations */
}
37. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries
@media screen and ( min-width: 500px ) and
( max-width: 800px ) {
/* CSS declarations */
}
This is for screen only (desktops, smartphones,
not print)
38. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries
@media screen and ( min-width: 500px ) and
( max-width: 800px ) {
/* CSS declarations */
}
The width of the window must be AT LEAST
500px
39. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries
@media screen and ( min-width: 500px ) and
( max-width: 800px ) {
/* CSS declarations */
}
The width of the window must ALSO be NO
MORE THAN 800px
40. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Media Queries
@media screen and ( min-width: 500px ) and
( max-width: 800px ) {
img { border: 5px solid #fff; }
}
Images will have a white border when the
window is from 500px to 800px wide
41. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
42. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Design Pattern
a design pattern is a general
reusable solution to a commonly
occurring problem within a
given context in software design
43. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Patterns
Layouts
http://www.lukew.com/ff/entry.asp?1514
Luke Wroblewski
49. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Toggle Navigation
Home About Location Services Contact Us
Home
About
Location
Services
Contact Us
Menu. Menu.
50. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
<select> Navigation
Home About Location Services Contact Us
51. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Footer Navigation
Home About Location Services Contact Us Menu.
Home
About
Location
Services
Contact Us
52. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Stacked Top Links Navigation
Home About Location Services Contact Us
Home
About
Location
Services
Contact Us
53. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Left Nav Flyout
Home About Location Services Contact Us Menu
Echo Park chambray
90's fap cardigan
keffiyeh, trust fund
retro Truffaut next
level.
Lomo forage pop-up
Neutra, fashion axe
sustainable keffiyeh
helvetica DIY.
Fashion axe Neutra
craft beer four loko
helvetica. American
apparel sustainable
kale chips Etsy, photo
booth VHS shabby chic.
Home About Location Services Contact Us
Home
About
Location
Services
Contact Us
Menu
Echo Park chambray
90's fap cardigan
keffiyeh, trust fund
retro Truffaut next
level.
Lomo forage pop-up
Neutra, fashion axe
sustainable keffiyeh
helvetica DIY.
Fashion axe Neutra
craft beer four loko
helvetica. American
apparel sustainable
kale chips Etsy, photo
booth VHS shabby chic.
54. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Priority+ Navigation
Home About Location Services Contact Us Home Location More
55. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Priority+ Navigation
Home About ▼ Location ▼ Services ▼ Contact Us
Service 1
Service 2
Service 3
Home
About +
Location +
Services -
Service 1
Service 2
Service 3
Contact Us
56. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Patterns
Order Shift
http://bradfrost.github.io/this-is-responsive/
patterns.html
Brad Frost
57. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Source Order (table display)
Home About Location Services Contact Us
Home
About
Location
Services
Contact Us
Lorem ipsum dolor sit amet
Consectetur adipiscing elit. Sed vel vehicula
justo, et vestibulum erat. Maecenas sagittis
volutpat molestie. Integer tortor mi, egestas
et tristique quis, tempus nec diam
Lorem ipsum
dolor sit amet
Consectetur
adipiscing elit.
Sed vel vehicula
justo, et
vestibulum erat.
Maecenas sagittis
volutpat molestie.
Integer tortor mi,
egestas et
2nd in source
1st in source
2nd in source
1st in source
58. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Patterns
Order Shift
http://www.jordanm.co.uk/lab/
contentchoreography
Jordan Moore
60. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
86. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
93. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Detect Features
http://modernizr.com/
Modernizr is a small JavaScript library that detects the availability of
native implementations for next-generation web technologies, i.e.
features that stem from the HTML5 and CSS3 specifications...
...what Modernizr does is, very simply, tell you whether the current
browser has this feature natively implemented or not.
99. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
target ÷ context = result
required
font size
container’s
font size
desired
font size
100. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Set base size
body { font-size : 100%; }
Base font size: 16px;
1em = 16px
http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw/
101. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
24 ÷ 16 = 1.5
required
font size
(em)
container’s
font size
(px)
desired
font size
(px)
105. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
106. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Approaches
• Mobile First
and add styles and breakpoints
• Adaptive Web Design
predefined screensizes
• Multiple Grids
different grids for different breakpoints
(gridsetapp for example)
107. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Approaches
• Small is Special
Unique case for <480px (ish)
• Device Detection
widths, assumptions, scripts, resolutions
• Frameworks
pre-built grids and modules
108. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Start with the small screen first,
then expand until it looks like shit.
TIME FOR A BREAKPOINT!
“
”
@stephenhay
112. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Multiple Images
• Clown Car Technique
(svg file, swap images as backgrounds)
• Picture Polyfill
https://github.com/scottjehl/picturefill
• 8 guidelines and 1 rule
http://blog.cloudfour.com/8-guidelines-
and-1-rule-for-responsive-images/
113. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
121. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
132. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
TOPICS
• What is RWD?
• How it works
• Design Patterns in RWD
• Some good examples
• Walkthrough making a responsive website
• Some different approaches
• Some useful frameworks
• Some useful tools
• Designing for RWD
133. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Mockups?
• Time consuming
too many variations
• Untested
get on devices sooner rather than later
• Waterfall
be agile!
134. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Mood boards
When trying to convey a design idea, moods,
feelings and fluffy stuff like that are hard to
communicate ... designers will often use a
mood board: a collection of textures, images
and text related to a design theme as a
reference point.
http://www.creativebloq.com/graphic-design/mood-boards-812470
140. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Style tiles
An interior designer doesn't
design three different rooms for a
client at the first kick-off
meeting, so why do Web
designers design three different
webpage mockups?
141. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Style tiles
Style Tiles are a design
deliverable consisting of fonts,
colors and interface elements
that communicate the essence of
a visual brand for the web.
144. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
“
Prototype
Build an interface everyone can
start looking at, using, clicking
through, and "feeling" before you
start worrying about back-end
code. Get yourself in front of the
customer experience as much as
possible. / JASON FRIED
145. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Prototype
• Download Zurb or Bootstrap
• Test & find out what doesn’t work
• Make a Wireframe
• Make a PSD
• Make HTML pages
• Integrate
• Test & find out what doesn’t work
or
149. @IRISHSTU #RWD WORKSHOP 25 JUNE 2013
Dip your toes
• Design in the browser
• Start with mobile
• Add a breakpoint around 500px
• Add a breakpoint around 800px
• Keep it simple!