SlideShare a Scribd company logo
Responsive Design:
Clever Tips and Tricks
Vitaly Friedman
28/11/2012 @ FOWD, Prague
Vitaly Friedman, editor-in-chief
and co-founder of SmashingMag
Rwd slidedeck
This talk is about RWD techniques.
And simple, clever tricks and ideas.
This talk is about RWD techniques.
And simple, clever tricks and ideas.
This talk is about RWD techniques.
And (a bit) about our 2012 redesign.
Responsive Web
Design (Extended)
The dangerous thing is not that
machines might start thinking like
humans, but that humans might start
thinking like machines.
— Sydney J. Harris
“
When Sydney J. Harris said that, he meant
human society and our understanding of
computers. But it can relate to what we do as
we'll. When we think about the Web, what do
We are blinded by chrome. When it
comes to RWD, we think about layouts,
and often we should, but we have to
keep in mind that we are not rectangle
artists. we explore solutions to
problems. Browsers think in boxes, but
humans shouldn't.
Wir denken dass das Web so aussieht.
Als Designer sehen wir uns oft als Pixel-Pusher
oder Rectangle Zeichner. So sieht das Web aber
nicht aus
When it comes to responsive design, we think
about layouts, and sometimes we should, but we
have to keep in mind that we aren’t rectangle
artists. We explore solutions to problems.
A fluid, unpredictable, chaotic,
interconnected environment
with plenty of right and wrong
solutions. I always feel weird
about blog posts on why RWD is
a wrong technique, or HTML5/
native is a wrong solution. The
Web isn’t black and white, it’s
rich, extremely diverse and it
requires pragmatic thinking.
Responsive Web Design is an
appropriate tool for this “fluid” Web.
It’s a new mindset that requires us to
rethink and extend our practices.
Content
Choreography
“
Media queries can be used to do
more than patch broken layouts:
with proper planning, we can
begin to choreograph content
proportional to screen size,
serving the best possible
experience at any width.
— Trent Walton
Rwd slidedeck
Rwd slidedeck
Content Choreography
• From the technical standpoint, arrangement
of boxes is often implemented using Flexbox.
@media screen and
(max-width: 33.236em) {
#main { display: flex; }
#main > nav,
#main > aside { flex: 1; }
#main > article { flex: 2; }
#main > nav { order: 0; }
#main > article { order: 1; }
#main > aside { order: 2; }
Rwd slidedeck
We can manipulate
experiences to make
them genuine across
different viewports —
be it desktop, mobile or
anything else.
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Resolution
Independence
Resolution Independence
• High pixel density displays prompt us to
create future-proof solutions for graphics.
• Creating multiple assets for the same
graphics (not photos) isn’t future-proof.
• Two options: SVG and Icon Fonts.
• HTML:
<ul class="actions">
<li><a class="a-share" href="#">Share</a></li>
<li><a class="a-print" href="#">Print</a></li>
</ul>
• CSS:
.actions a { font-size: 1em; /* Sprite: 30x160px */
background-image: url('sprite.png'); }
.actions .a-share {
background-position: 10px 0; }
.actions .a-print {
background-position: 10px -40px; }
PNG sprites
• HTML:
<ul class="actions">
<li><a class="a-share" href="#">Share</a></li>
</ul>
• CSS:
body { font-size: 100%; } /* = 16px by default */
.actions a { font-size: 1em;
background-image: url('sprite.svg');
background-size: 1.875em 10em; }
.actions .a-share {
background-position: 0.625em 0; }
SVG sprites
Resolution Independence (SVG)
• SVG files are usually larger and browsers
need more time to rasterize and display them.
• Good SVG support: Chrome 4+, Safari 4+,
FF4+, Opera 9.5+, IE9+, mobile browsers.
• For legacy browsers (and Android 2.3)
we need PNG-fallback with Conditional
Comments (IE<9) or Modernizr.
• HTML:
<a class="icon share" href="#">Share</a>
• CSS:
@font-face { font-family: 'Icon Font';
src: url('icon-font.eot');
src: local('☺');
url('icon-font.woff') format('woff'),
url('icon-font.ttf') format('truetype'),
url('icon-font.svg') format('svg'); }
.icon { font-family: 'Icon Font'; font-size: 20px; }
.share:before { content: "s"; }
Icon Fonts
• HTML:
<a class="icon" data-icon="s" href="#">Share</a>
<a class="icon" data-icon="h" href="#">History</a>
• CSS:
.icon:before {
content: attr(data-icon);
/* Optional color definition */
}
Icon Fonts
Resolution Independence
(Web Fonts)
• There are many comprehensive Web fonts:
Entypo and FontAwesome are free.
• Excellent support: everywhere but Opera
Mini and Android 2.1.
• Build custom, small “bundles” with Fontello
(combines popular open-source fonts).
Rwd slidedeck
Compressive
Images
Compressive Images
• To display photos properly on high pixel
density displays, we don’t need hi-res images.
• If a JPG image has relatively small dimensions,
we can use a workaround to keep its size small.
• Solution: given a “normal” image resolution,
double it and use minimal JPEG compression.
“
...Given two identical images that
are displayed at the same size on a
website, one can be dramatically
smaller than the other in file size
if it’s highly compressed and
dramatically larger in dimensions
than it is displayed.
— Daan Jobsis
600×400px file, 0% JPEG compression,
displayed in 600×400 (file size 7 Kb)
600×400px file, 0% JPEG compression,
displayed in 300×200 (file size 7 Kb)
600×400px file (7 Kb)
________________________________
0% JPEG compression
displayed in 300×200
300×200px file (21 Kb)
_________________________________
80% JPEG compression
displayed in 300×200
Rwd slidedeck
Rwd slidedeck
Conditional
Loading
“
If you [...] had to choose between
employing media queries to make
the design look good on a mobile
device or optimizing the site for
performance, you would be better
served by making the desktop site
blazingly fast.
— Jason Grigsby
Conditional CSS
• We ask browsers to load assets progressively —
and only when they can be displayed.
• Idea: if a CSS media query was fired, catch it
with JavaScript and load additional assets.
• CSS:
@media all and (min-width: 45em) {
body:after {
content: 'desktop';
display: none;
}
}
Conditional CSS
• JS:
var size =
window.getComputedStyle(document.body,':after').get
PropertyValue('content');
if (size == 'desktop') {
// Load some more content.
}
• CSS:
@media all and (min-width: 45em) {
body:after {
content: 'desktop';
display: none;
}
}
Conditional CSS (Example)
• CSS:
@media all and (min-width: 45em) {
body:after {
content: 'desktop';
display: none;
}
}
• HTML:
<a href="desktop-friendly-version.jpg">
<img src="mobile-version.jpg"
data-medium="tablet-friendly-version.jpg"
data-large="desktop-friendly-version.jpg" /></a>
Conditional CSS (Example)
• JavaScript:
var size =
window.getComputedStyle(document.body,':after').get
PropertyValue('content');
if (size == 'desktop') {
$('img').each(function(index) {
var large = $(this).data('large');
$(this).attr('src',large);
}
}
if (size == 'tablet') {...
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Lazy Loading
JS, Social Buttons
Gmail’s Lazy Loading
• Latency is the time between when a browser
requests a resource from a server and when it
starts to receive the server’s response.
• On mobile, latency is a major UX killer. For a
1Mb page with 85 requests per page, it is 4.5s!
• JavaScript is expensive; parsing takes time and
blocks the rendering of the page. Usually you
don’t need all JavaScript right away.
Gmail’s Lazy Loading
• Idea: let browsers download all of the JS right
away, but evaluate it “on demand”, i.e. when
users need a particular feature.
• Much of the downloaded JS is commented out,
and when needed uncommented and eval-ed.
• Gmail’s case:
200 Kb of JS -> 2600 ms page load
200 Kb of JS (lazy loaded) -> 240 ms page load
Gmail’s Lazy Loading
• <script id="lazy">
// Make sure you strip out (or replace) comment
blocks in your JavaScript first.
/* JavaScript of lazy module */
</script>
<script>
function lazyLoad() {
var lazyElement = document.getElementById('lazy');
var lazyElementBody = lazyElement.innerHTML;
var jsCode = stripOutCommentBlock(lazyElementBody);
eval(jsCode); }
</script>
<div onclick=lazyLoad()>Lazy Load</div>
Rwd slidedeck
The Two-Click Social Widget
• Load social widgets only when user explicitly
chooses to take that action to share content.
• Idea: load small social icons by default, and
load the FB, Twitter and G+ widgets on click.
• Cuts down on bandwidth and on latency.
(FB button alone weighs 120 Kb + 4 requests).
Rwd slidedeck
Rwd slidedeck
Protecting image/
video aspect ratios
Protecting Image Aspect Ratios
• When max-width: 100%; is applied to an
image with width and height attributes
defined in HTML, image rescales incorrectly.
• Solution: add height: auto; for images to
which max-width: 100% is applied.
• CSS:
img, video { max-width: 100%; height: auto; }
Intrinsic Ratio For Videos
• To ensure the intrinsic 4:3 or 16:9 ratios for
videos, we create a box with the proper ratio,
then stretch the video inside to fit the
dimensions of the box.
• HTML:
<div class="wrapper-with-intrinsic-ratio">
<div class="element-to-stretch"></div>
</div>
Intrinsic Ratio For Videos
• CSS:
.wrapper-with-intrinsic-ratio {
position: relative;
padding-top: 25px; /* player chrome */
padding-bottom: 56.25%; /* 9:16 = 0.5625 */
height: 0; }
.element-to-stretch {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: teal;	}
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Responsive Videos
• We can serve different video files to different
devices by using media attribute on the
video <source> attribute.
• Supported in the latest versions of Chrome,
Opera, Safari, FF 15+, IE9+, mobile browsers.
Responsive Videos
• HTML:
<video controls preload="none">
<source type="video/mp4" src="video_small.mp4"
media="all and (max-width: 480px),
all and (max-device-width: 480px)">
<source type="video/webm" src="video_small.webm"
media="all and (max-width: 480px),
all and (max-device-width: 480px)">
<source type="video/mp4" src="video.mp4">
<source type="video/webm" src="video.webm">

</video>
Vertical media
queries & splitting
Vertical Media Queries
• min-height and max-height are useful for
adjusting the font-size, padding, margin and
cropping images.
• Beware of h/v-media queries collisions when
resizing the browser. Things might easily
get out of control.
Rwd slidedeck
Rwd slidedeck
Media Queries Splitting
• In development, we can use a breakpoint-
based organization for CSS (“min-width”):
0-up.css, 450-up.css, 720-up.css etc.
• We can also set breakpoints 1px apart and
split styles instead of overriding from one
media query to the next (“min/max-width”):
base.css, 0-449.css, 450-719.css etc.
Media Queries Splitting
• In practice, it’s often a good starting point to
work with em media queries right away.
0-up.css, 25em-up.css, 35em-up.css etc.
• If it’s not an option, it’s a good idea to convert
px to em for production code to improve
maintenance and avoid zooming issues.
Rwd slidedeck
Rwd slidedeck
Debugging
Media Queries
“
Designing for the Web is like
visualizing a tesseract. We build
experiences by manipulating their
shadows.
— Tim Brown
Debugging Media Queries
• Due to lack of convenient tools, debugging
RWD often feels like groping in the dark.
There are some popular techniques though.
• Setting the body bg color to different colors for
each breakpoint. Also box-sizing: border-box.
• The * technique for testing for optimal
measure in the browser.
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
People like to test a number
of metrics to see why people
are not * staying on a site. I
think sometimes we spend
so much time focusin* g on
analytics that we have no...
*
*
People like to test a number
of metrics to see why people
are not * staying on a site. I
think sometimes we spend
so much time focusin* g on
analytics that we have no...
*
*
Rwd slidedeck
Rwd slidedeck
Typography-Out Approach is an option
for building responsive websites.
Typography-Out
Approach
Rwd slidedeck
We prepared a series of
moodboards to further
explore the idea we had,
especially to find
elements that a new,
content-heavy layout
could use.
We focused
specifically on
macro- and
microtypography as
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Our design process was defined by one
major constraint: perfect measure.
If we could adequately typeset an article and
thus establish the general context of the
design, everything else would follow. [...]
The key attribute for achieving perfect
typesetting was perfect measure: a good
average between 45 and 90 characters per
line—on all screen resolutions.
— Elliot Jay Stocks, “Smashing Book 3”
“
So we started looking for typefaces that would best express our
new vision, values and our deisgn persona...and oh boy were we
excited. We felt like a kid in a candy store... until we had to be
thrown into cold shower.
With the abundance of rich typefaces on the Web, we excitedly
jumped into the myriad of possibilities. We experimented with
literally dozens of typefaces from several type foundries in various
pairings: we considered Centro Sans and Centro Serif, Meta and
Meta Serif, Adelle, Ronnia, LFT Etica, FF Tisa, just to name a few.
We observed how they looked at different font sizes and how well
they worked together. We examined how well they appeared in bold
and italic and in headings and body copy, as well as how they worked
in less obvious contexts such as image captions.
Rwd slidedeck
Typefaces should be optimized for
long reading on (many) screens and
fit various contexts.
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
We started out with setting up a couple of demo pages for
typography, including links, italics, bold.
With all design distractions removed, we could pay a great
deal of technical attention to the type once we set up our
basic styles. How legible is this typeface at a particular size?
How well does it perform on Windows? Is there a superior
version from an alternative font delivery network that
perhaps uses PostScript outlines for display sizes?
Focusing on these fine details is much easier when you’re
looking purely at the type and nothing else.
Because there’s a lot going on visually on Smashing
Magazine—screenshots, buttons and noisy ads—a sans-serif
felt like a more sensible, uncluttered route for body copy. In
fact, it was difficult to imagine a serif typeface being used for
code-heavy articles in the coding section.
Sorry, Proxima Nova rendering is
incorrect on this screenshot, but we
lost the original files. :-)
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
We started from mobile, and worked
our way upwards to desktop views.
Rwd slidedeck
Rwd slidedeck
Navigation changes: we
used two markups: one
with select, another
with a nested unordered
list. and switches them
on and off with CSS.
The keywords were carefully
chosen and tested.
We kned that it would take too
much space, but we decided to test
it and it performed fairly well.
We’ve developed a toggle menu here
as well, it is currently in the queue
for testing. We had drop-down...
initially here...
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
We never targeted specific devices—
and introduced media queries
whenever it felt natural to do so.
Responsive design affects viewports
and media, including print.
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Responsive
Design Patterns
Responsive Design Patterns
• Responsive design affects all design assets:
layout, images, type, navigation, tables,
calendars, galleries, forms, maps, ads...
• Offline access and mobile UX enhancements
complement RWD very well (e.g. HTML5
localStorage, GeoLocation, Telephone links).
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
Responsive Design Patterns
• Media queries aren’t supported in Android
2.1 native client, Gmail app on all platforms,
Win Mobile 6.1 & Phone 7, BlackBerry OS 5.
• Also, Webmail services tend to ignore media
queries and overwrite them with their custom
CSS code.
Rwd slidedeck
http://bradfrostweb.com/blog/mobile/anatomy-of-a-mobile-first-responsive-web-design/
Rwd slidedeck
There are still many
unsolved problems.
There are still many
unsolved problems.
Web forms
Images
Performance
Consistency
Maintenance
Debugging
The Very Final
Conclusion
Rwd slidedeck
Rwd slidedeck
Rwd slidedeck
www.smashingbook.com
www.the-mobile-book.com
Rwd slidedeck
Thank You
For Your Attention!
@smashingmag
Image credits
• Front cover: Geometric Wallpapers
by Simon C Page (http://simoncpage.co.uk/
blog/2012/03/ipad-hd-retina-wallpaper/)
• Homer Simpsons: http://smashed.by/homer,
http://smashed.by/crazy-homer

More Related Content

What's hot

CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
Man Math
 
Project management
Project managementProject management
Project management
Simon Collison
 
Elegant Web Typography
Elegant Web TypographyElegant Web Typography
Elegant Web Typography
jeff_croft
 
Old Dog, New Tricks
Old Dog, New TricksOld Dog, New Tricks
Old Dog, New Tricks
Simon Collison
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
jameswillweb
 
Html5 public
Html5 publicHtml5 public
Html5 public
doodlemoonch
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
Lohith Goudagere Nagaraj
 
Html5
Html5Html5
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
Kaloyan Kosev
 
Better Typography
Better TypographyBetter Typography
Better Typography
markboultondesign
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
Chris Mills
 
Silverlight 5
Silverlight 5Silverlight 5
Silverlight 5
Jeremy Likness
 
A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....
A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....
A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....
Aidan Foster
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
Tilak Joshi
 
Html5
Html5Html5
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScript
Kevin Hakanson
 

What's hot (16)

CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 
Project management
Project managementProject management
Project management
 
Elegant Web Typography
Elegant Web TypographyElegant Web Typography
Elegant Web Typography
 
Old Dog, New Tricks
Old Dog, New TricksOld Dog, New Tricks
Old Dog, New Tricks
 
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake OilCSS3 Media Queries: Mobile Elixir or CSS Snake Oil
CSS3 Media Queries: Mobile Elixir or CSS Snake Oil
 
Html5 public
Html5 publicHtml5 public
Html5 public
 
HTML5 - A Whirlwind tour
HTML5 - A Whirlwind tourHTML5 - A Whirlwind tour
HTML5 - A Whirlwind tour
 
Html5
Html5Html5
Html5
 
HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
 
Better Typography
Better TypographyBetter Typography
Better Typography
 
The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)The web standards gentleman: a matter of (evolving) standards)
The web standards gentleman: a matter of (evolving) standards)
 
Silverlight 5
Silverlight 5Silverlight 5
Silverlight 5
 
A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....
A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....
A Responsive Design Case Study - What We Did Wrong Building ResponsiveDesign....
 
HTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web DevelopmentHTML5: An Introduction To Next Generation Web Development
HTML5: An Introduction To Next Generation Web Development
 
Html5
Html5Html5
Html5
 
Make your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScriptMake your own Print & Play card game using SVG and JavaScript
Make your own Print & Play card game using SVG and JavaScript
 

Similar to Rwd slidedeck

Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
Yandex
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
Frédéric Harper
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
Frédéric Harper
 
SCREENS - 2012-09-28 - Responsive Web Design, get the best from your design
SCREENS - 2012-09-28 - Responsive Web Design, get the best from your designSCREENS - 2012-09-28 - Responsive Web Design, get the best from your design
SCREENS - 2012-09-28 - Responsive Web Design, get the best from your design
Frédéric Harper
 
Trendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondTrendsetting: Web Design and Beyond
Trendsetting: Web Design and Beyond
Andy Stratton
 
Going Responsive with WordPress
Going Responsive with WordPressGoing Responsive with WordPress
Going Responsive with WordPress
James Cryer
 
Responsive content
Responsive contentResponsive content
Responsive content
honzie
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
Naga Harish M
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Mario Noble
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
mikeleeme
 
Design responsively
Design responsivelyDesign responsively
Design responsively
Célia Leocádio
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
Mediacurrent
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
Cantina
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
Andreas Bovens
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + Fireworks
Nathan Smith
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
Joe Seifi
 
Responsive Web Design - Devoxx UK - 2014-06-13
Responsive Web Design - Devoxx UK - 2014-06-13Responsive Web Design - Devoxx UK - 2014-06-13
Responsive Web Design - Devoxx UK - 2014-06-13
Frédéric Harper
 
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at ScaleResponsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at Scale
scottjehl
 

Similar to Rwd slidedeck (20)

Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
 
FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
SCREENS - 2012-09-28 - Responsive Web Design, get the best from your design
SCREENS - 2012-09-28 - Responsive Web Design, get the best from your designSCREENS - 2012-09-28 - Responsive Web Design, get the best from your design
SCREENS - 2012-09-28 - Responsive Web Design, get the best from your design
 
Trendsetting: Web Design and Beyond
Trendsetting: Web Design and BeyondTrendsetting: Web Design and Beyond
Trendsetting: Web Design and Beyond
 
Going Responsive with WordPress
Going Responsive with WordPressGoing Responsive with WordPress
Going Responsive with WordPress
 
Responsive content
Responsive contentResponsive content
Responsive content
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
 
Design responsively
Design responsivelyDesign responsively
Design responsively
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
Adobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + FireworksAdobe MAX 2008: HTML/CSS + Fireworks
Adobe MAX 2008: HTML/CSS + Fireworks
 
Responsive Websites
Responsive WebsitesResponsive Websites
Responsive Websites
 
Responsive Web Design - Devoxx UK - 2014-06-13
Responsive Web Design - Devoxx UK - 2014-06-13Responsive Web Design - Devoxx UK - 2014-06-13
Responsive Web Design - Devoxx UK - 2014-06-13
 
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at ScaleResponsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at Scale
 

More from Vera Kovaleva

44.Title slide.pdf
44.Title slide.pdf44.Title slide.pdf
44.Title slide.pdf
Vera Kovaleva
 
47.Thank you.pdf
47.Thank you.pdf47.Thank you.pdf
47.Thank you.pdf
Vera Kovaleva
 
49.Call to action.pdf
49.Call to action.pdf49.Call to action.pdf
49.Call to action.pdf
Vera Kovaleva
 
48.Questions.pdf
48.Questions.pdf48.Questions.pdf
48.Questions.pdf
Vera Kovaleva
 
42.Coordinate System.pdf
42.Coordinate System.pdf42.Coordinate System.pdf
42.Coordinate System.pdf
Vera Kovaleva
 
50.Last slide.pdf
50.Last slide.pdf50.Last slide.pdf
50.Last slide.pdf
Vera Kovaleva
 
43.Comparison.pdf
43.Comparison.pdf43.Comparison.pdf
43.Comparison.pdf
Vera Kovaleva
 
45.Second slides.pdf
45.Second slides.pdf45.Second slides.pdf
45.Second slides.pdf
Vera Kovaleva
 
46.Section.pdf
46.Section.pdf46.Section.pdf
46.Section.pdf
Vera Kovaleva
 
41.Continuum.pdf
41.Continuum.pdf41.Continuum.pdf
41.Continuum.pdf
Vera Kovaleva
 
36.Timeline.pdf
36.Timeline.pdf36.Timeline.pdf
36.Timeline.pdf
Vera Kovaleva
 
39.Cloud.pdf
39.Cloud.pdf39.Cloud.pdf
39.Cloud.pdf
Vera Kovaleva
 
34.Scheme.pdf
34.Scheme.pdf34.Scheme.pdf
34.Scheme.pdf
Vera Kovaleva
 
40.Circles.pdf
40.Circles.pdf40.Circles.pdf
40.Circles.pdf
Vera Kovaleva
 
35.Process.pdf
35.Process.pdf35.Process.pdf
35.Process.pdf
Vera Kovaleva
 
38.Multiplicity.pdf
38.Multiplicity.pdf38.Multiplicity.pdf
38.Multiplicity.pdf
Vera Kovaleva
 
37.Arrow.pdf
37.Arrow.pdf37.Arrow.pdf
37.Arrow.pdf
Vera Kovaleva
 
31.Mind.pdf
31.Mind.pdf31.Mind.pdf
31.Mind.pdf
Vera Kovaleva
 
32.Time.pdf
32.Time.pdf32.Time.pdf
32.Time.pdf
Vera Kovaleva
 
33.Orbit.pdf
33.Orbit.pdf33.Orbit.pdf
33.Orbit.pdf
Vera Kovaleva
 

More from Vera Kovaleva (20)

44.Title slide.pdf
44.Title slide.pdf44.Title slide.pdf
44.Title slide.pdf
 
47.Thank you.pdf
47.Thank you.pdf47.Thank you.pdf
47.Thank you.pdf
 
49.Call to action.pdf
49.Call to action.pdf49.Call to action.pdf
49.Call to action.pdf
 
48.Questions.pdf
48.Questions.pdf48.Questions.pdf
48.Questions.pdf
 
42.Coordinate System.pdf
42.Coordinate System.pdf42.Coordinate System.pdf
42.Coordinate System.pdf
 
50.Last slide.pdf
50.Last slide.pdf50.Last slide.pdf
50.Last slide.pdf
 
43.Comparison.pdf
43.Comparison.pdf43.Comparison.pdf
43.Comparison.pdf
 
45.Second slides.pdf
45.Second slides.pdf45.Second slides.pdf
45.Second slides.pdf
 
46.Section.pdf
46.Section.pdf46.Section.pdf
46.Section.pdf
 
41.Continuum.pdf
41.Continuum.pdf41.Continuum.pdf
41.Continuum.pdf
 
36.Timeline.pdf
36.Timeline.pdf36.Timeline.pdf
36.Timeline.pdf
 
39.Cloud.pdf
39.Cloud.pdf39.Cloud.pdf
39.Cloud.pdf
 
34.Scheme.pdf
34.Scheme.pdf34.Scheme.pdf
34.Scheme.pdf
 
40.Circles.pdf
40.Circles.pdf40.Circles.pdf
40.Circles.pdf
 
35.Process.pdf
35.Process.pdf35.Process.pdf
35.Process.pdf
 
38.Multiplicity.pdf
38.Multiplicity.pdf38.Multiplicity.pdf
38.Multiplicity.pdf
 
37.Arrow.pdf
37.Arrow.pdf37.Arrow.pdf
37.Arrow.pdf
 
31.Mind.pdf
31.Mind.pdf31.Mind.pdf
31.Mind.pdf
 
32.Time.pdf
32.Time.pdf32.Time.pdf
32.Time.pdf
 
33.Orbit.pdf
33.Orbit.pdf33.Orbit.pdf
33.Orbit.pdf
 

Recently uploaded

(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}
(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}
(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}
bookkdreamsgirls
 
一比一原版(Warwick毕业证)英国华威大学毕业证如何办理
一比一原版(Warwick毕业证)英国华威大学毕业证如何办理一比一原版(Warwick毕业证)英国华威大学毕业证如何办理
一比一原版(Warwick毕业证)英国华威大学毕业证如何办理
0dtluq4l
 
欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .
欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .
欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .
nievesambar838
 
UXPA 2024- Baking Accessibility into Design.pdf
UXPA 2024- Baking Accessibility into Design.pdfUXPA 2024- Baking Accessibility into Design.pdf
UXPA 2024- Baking Accessibility into Design.pdf
Swapnali Thakar
 
NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...
NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...
NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...
bookkdreamsgirls
 
Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love vashikara...
Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love  vashikara...Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love  vashikara...
Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love vashikara...
bookkdreamsgirls
 
十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】
十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】
十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】
andreassenrolf537
 
2023 State of Design & Make. By Autodesk
2023 State of Design & Make. By Autodesk2023 State of Design & Make. By Autodesk
2023 State of Design & Make. By Autodesk
DiegoSendnTorres
 
Gender Equity in Architecture: Cultural Anthropology in Design Ideologies
Gender Equity in Architecture: Cultural Anthropology in Design IdeologiesGender Equity in Architecture: Cultural Anthropology in Design Ideologies
Gender Equity in Architecture: Cultural Anthropology in Design Ideologies
Aditi Sh.
 
Sketchy Micro Flashcards.pdf by sketchy micro not anki
Sketchy Micro Flashcards.pdf by sketchy micro not ankiSketchy Micro Flashcards.pdf by sketchy micro not anki
Sketchy Micro Flashcards.pdf by sketchy micro not anki
ssusercbe4b5
 
Amourochure20 we don't know at the 24-1.pdf
Amourochure20 we don't know at the 24-1.pdfAmourochure20 we don't know at the 24-1.pdf
Amourochure20 we don't know at the 24-1.pdf
GamerLover1
 
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
xedese
 
Black magic expert in Delhi {=/+91 0000//0000 /} Black Magic Specialist Delhi
Black magic expert in Delhi  {=/+91 0000//0000 /} Black Magic Specialist DelhiBlack magic expert in Delhi  {=/+91 0000//0000 /} Black Magic Specialist Delhi
Black magic expert in Delhi {=/+91 0000//0000 /} Black Magic Specialist Delhi
antxmodels
 
🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services
🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services
🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services
bookkdreambebe
 
Coleman_Lana_DMBS_PersonalBrand1_2024-09.pptx
Coleman_Lana_DMBS_PersonalBrand1_2024-09.pptxColeman_Lana_DMBS_PersonalBrand1_2024-09.pptx
Coleman_Lana_DMBS_PersonalBrand1_2024-09.pptx
lanajaneerin57
 
Top 5 Best Tantrik in Delhi- {=/+91 0000//0000 /} Black Magic Specialist In ...
Top 5 Best Tantrik in Delhi-  {=/+91 0000//0000 /} Black Magic Specialist In ...Top 5 Best Tantrik in Delhi-  {=/+91 0000//0000 /} Black Magic Specialist In ...
Top 5 Best Tantrik in Delhi- {=/+91 0000//0000 /} Black Magic Specialist In ...
antxmodels
 
{=/+91 0000//0000 /} NO1 Certified Best vashikaran specialist in delhi
{=/+91 0000//0000 /}  NO1 Certified Best vashikaran specialist in delhi{=/+91 0000//0000 /}  NO1 Certified Best vashikaran specialist in delhi
{=/+91 0000//0000 /} NO1 Certified Best vashikaran specialist in delhi
bookkdreamsgirls
 
Contact Best Vashikaran and Black Magic Specialist in Delhi {=/+91 0000//000...
Contact Best Vashikaran and Black Magic Specialist in Delhi  {=/+91 0000//000...Contact Best Vashikaran and Black Magic Specialist in Delhi  {=/+91 0000//000...
Contact Best Vashikaran and Black Magic Specialist in Delhi {=/+91 0000//000...
bookkdreamsgirls
 
Mastering the Art of Textures and Patterns in Interior Design.pdf
Mastering the Art of Textures and Patterns in Interior Design.pdfMastering the Art of Textures and Patterns in Interior Design.pdf
Mastering the Art of Textures and Patterns in Interior Design.pdf
Freixa Home Design
 
Graphic Design Essentials: From Concept to Creation
Graphic Design Essentials: From Concept to CreationGraphic Design Essentials: From Concept to Creation
Graphic Design Essentials: From Concept to Creation
Muhammad Talha Rafiq
 

Recently uploaded (20)

(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}
(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}
(=) vashikaran specialist In Delhi astrologer In Delhi {=/+91 0000//0000 /}
 
一比一原版(Warwick毕业证)英国华威大学毕业证如何办理
一比一原版(Warwick毕业证)英国华威大学毕业证如何办理一比一原版(Warwick毕业证)英国华威大学毕业证如何办理
一比一原版(Warwick毕业证)英国华威大学毕业证如何办理
 
欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .
欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .
欧洲杯实时赔率靠谱平台-推荐欧洲杯实时赔率靠谱平台 |【​网址​🎉ac22.net🎉​】 .
 
UXPA 2024- Baking Accessibility into Design.pdf
UXPA 2024- Baking Accessibility into Design.pdfUXPA 2024- Baking Accessibility into Design.pdf
UXPA 2024- Baking Accessibility into Design.pdf
 
NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...
NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...
NO1 Certified Best vashikaran specialist in delhi | +0000000000 vashikaran ba...
 
Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love vashikara...
Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love  vashikara...Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love  vashikara...
Call +91 0000//0000 black Magic Specialist In Delhi [* "=" *] Love vashikara...
 
十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】
十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】
十大热门2024欧洲杯投注首页-十大2024欧洲杯投注网站 |【​网址​🎉ac10.net🎉​】
 
2023 State of Design & Make. By Autodesk
2023 State of Design & Make. By Autodesk2023 State of Design & Make. By Autodesk
2023 State of Design & Make. By Autodesk
 
Gender Equity in Architecture: Cultural Anthropology in Design Ideologies
Gender Equity in Architecture: Cultural Anthropology in Design IdeologiesGender Equity in Architecture: Cultural Anthropology in Design Ideologies
Gender Equity in Architecture: Cultural Anthropology in Design Ideologies
 
Sketchy Micro Flashcards.pdf by sketchy micro not anki
Sketchy Micro Flashcards.pdf by sketchy micro not ankiSketchy Micro Flashcards.pdf by sketchy micro not anki
Sketchy Micro Flashcards.pdf by sketchy micro not anki
 
Amourochure20 we don't know at the 24-1.pdf
Amourochure20 we don't know at the 24-1.pdfAmourochure20 we don't know at the 24-1.pdf
Amourochure20 we don't know at the 24-1.pdf
 
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
 
Black magic expert in Delhi {=/+91 0000//0000 /} Black Magic Specialist Delhi
Black magic expert in Delhi  {=/+91 0000//0000 /} Black Magic Specialist DelhiBlack magic expert in Delhi  {=/+91 0000//0000 /} Black Magic Specialist Delhi
Black magic expert in Delhi {=/+91 0000//0000 /} Black Magic Specialist Delhi
 
🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services
🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services
🚐Packers and Movers In Gurgaon 📞0000000000 📦Cargo Services
 
Coleman_Lana_DMBS_PersonalBrand1_2024-09.pptx
Coleman_Lana_DMBS_PersonalBrand1_2024-09.pptxColeman_Lana_DMBS_PersonalBrand1_2024-09.pptx
Coleman_Lana_DMBS_PersonalBrand1_2024-09.pptx
 
Top 5 Best Tantrik in Delhi- {=/+91 0000//0000 /} Black Magic Specialist In ...
Top 5 Best Tantrik in Delhi-  {=/+91 0000//0000 /} Black Magic Specialist In ...Top 5 Best Tantrik in Delhi-  {=/+91 0000//0000 /} Black Magic Specialist In ...
Top 5 Best Tantrik in Delhi- {=/+91 0000//0000 /} Black Magic Specialist In ...
 
{=/+91 0000//0000 /} NO1 Certified Best vashikaran specialist in delhi
{=/+91 0000//0000 /}  NO1 Certified Best vashikaran specialist in delhi{=/+91 0000//0000 /}  NO1 Certified Best vashikaran specialist in delhi
{=/+91 0000//0000 /} NO1 Certified Best vashikaran specialist in delhi
 
Contact Best Vashikaran and Black Magic Specialist in Delhi {=/+91 0000//000...
Contact Best Vashikaran and Black Magic Specialist in Delhi  {=/+91 0000//000...Contact Best Vashikaran and Black Magic Specialist in Delhi  {=/+91 0000//000...
Contact Best Vashikaran and Black Magic Specialist in Delhi {=/+91 0000//000...
 
Mastering the Art of Textures and Patterns in Interior Design.pdf
Mastering the Art of Textures and Patterns in Interior Design.pdfMastering the Art of Textures and Patterns in Interior Design.pdf
Mastering the Art of Textures and Patterns in Interior Design.pdf
 
Graphic Design Essentials: From Concept to Creation
Graphic Design Essentials: From Concept to CreationGraphic Design Essentials: From Concept to Creation
Graphic Design Essentials: From Concept to Creation
 

Rwd slidedeck

  • 1. Responsive Design: Clever Tips and Tricks Vitaly Friedman 28/11/2012 @ FOWD, Prague
  • 2. Vitaly Friedman, editor-in-chief and co-founder of SmashingMag
  • 4. This talk is about RWD techniques.
  • 5. And simple, clever tricks and ideas. This talk is about RWD techniques.
  • 6. And simple, clever tricks and ideas. This talk is about RWD techniques. And (a bit) about our 2012 redesign.
  • 8. The dangerous thing is not that machines might start thinking like humans, but that humans might start thinking like machines. — Sydney J. Harris “ When Sydney J. Harris said that, he meant human society and our understanding of computers. But it can relate to what we do as we'll. When we think about the Web, what do
  • 9. We are blinded by chrome. When it comes to RWD, we think about layouts, and often we should, but we have to keep in mind that we are not rectangle artists. we explore solutions to problems. Browsers think in boxes, but humans shouldn't.
  • 10. Wir denken dass das Web so aussieht. Als Designer sehen wir uns oft als Pixel-Pusher oder Rectangle Zeichner. So sieht das Web aber nicht aus When it comes to responsive design, we think about layouts, and sometimes we should, but we have to keep in mind that we aren’t rectangle artists. We explore solutions to problems.
  • 11. A fluid, unpredictable, chaotic, interconnected environment with plenty of right and wrong solutions. I always feel weird about blog posts on why RWD is a wrong technique, or HTML5/ native is a wrong solution. The Web isn’t black and white, it’s rich, extremely diverse and it requires pragmatic thinking.
  • 12. Responsive Web Design is an appropriate tool for this “fluid” Web.
  • 13. It’s a new mindset that requires us to rethink and extend our practices.
  • 15. “ Media queries can be used to do more than patch broken layouts: with proper planning, we can begin to choreograph content proportional to screen size, serving the best possible experience at any width. — Trent Walton
  • 18. Content Choreography • From the technical standpoint, arrangement of boxes is often implemented using Flexbox. @media screen and (max-width: 33.236em) { #main { display: flex; } #main > nav, #main > aside { flex: 1; } #main > article { flex: 2; } #main > nav { order: 0; } #main > article { order: 1; } #main > aside { order: 2; }
  • 20. We can manipulate experiences to make them genuine across different viewports — be it desktop, mobile or anything else.
  • 29. Resolution Independence • High pixel density displays prompt us to create future-proof solutions for graphics. • Creating multiple assets for the same graphics (not photos) isn’t future-proof. • Two options: SVG and Icon Fonts.
  • 30. • HTML: <ul class="actions"> <li><a class="a-share" href="#">Share</a></li> <li><a class="a-print" href="#">Print</a></li> </ul> • CSS: .actions a { font-size: 1em; /* Sprite: 30x160px */ background-image: url('sprite.png'); } .actions .a-share { background-position: 10px 0; } .actions .a-print { background-position: 10px -40px; } PNG sprites
  • 31. • HTML: <ul class="actions"> <li><a class="a-share" href="#">Share</a></li> </ul> • CSS: body { font-size: 100%; } /* = 16px by default */ .actions a { font-size: 1em; background-image: url('sprite.svg'); background-size: 1.875em 10em; } .actions .a-share { background-position: 0.625em 0; } SVG sprites
  • 32. Resolution Independence (SVG) • SVG files are usually larger and browsers need more time to rasterize and display them. • Good SVG support: Chrome 4+, Safari 4+, FF4+, Opera 9.5+, IE9+, mobile browsers. • For legacy browsers (and Android 2.3) we need PNG-fallback with Conditional Comments (IE<9) or Modernizr.
  • 33. • HTML: <a class="icon share" href="#">Share</a> • CSS: @font-face { font-family: 'Icon Font'; src: url('icon-font.eot'); src: local('☺'); url('icon-font.woff') format('woff'), url('icon-font.ttf') format('truetype'), url('icon-font.svg') format('svg'); } .icon { font-family: 'Icon Font'; font-size: 20px; } .share:before { content: "s"; } Icon Fonts
  • 34. • HTML: <a class="icon" data-icon="s" href="#">Share</a> <a class="icon" data-icon="h" href="#">History</a> • CSS: .icon:before { content: attr(data-icon); /* Optional color definition */ } Icon Fonts
  • 35. Resolution Independence (Web Fonts) • There are many comprehensive Web fonts: Entypo and FontAwesome are free. • Excellent support: everywhere but Opera Mini and Android 2.1. • Build custom, small “bundles” with Fontello (combines popular open-source fonts).
  • 38. Compressive Images • To display photos properly on high pixel density displays, we don’t need hi-res images. • If a JPG image has relatively small dimensions, we can use a workaround to keep its size small. • Solution: given a “normal” image resolution, double it and use minimal JPEG compression.
  • 39. “ ...Given two identical images that are displayed at the same size on a website, one can be dramatically smaller than the other in file size if it’s highly compressed and dramatically larger in dimensions than it is displayed. — Daan Jobsis
  • 40. 600×400px file, 0% JPEG compression, displayed in 600×400 (file size 7 Kb)
  • 41. 600×400px file, 0% JPEG compression, displayed in 300×200 (file size 7 Kb)
  • 42. 600×400px file (7 Kb) ________________________________ 0% JPEG compression displayed in 300×200 300×200px file (21 Kb) _________________________________ 80% JPEG compression displayed in 300×200
  • 46. “ If you [...] had to choose between employing media queries to make the design look good on a mobile device or optimizing the site for performance, you would be better served by making the desktop site blazingly fast. — Jason Grigsby
  • 47. Conditional CSS • We ask browsers to load assets progressively — and only when they can be displayed. • Idea: if a CSS media query was fired, catch it with JavaScript and load additional assets. • CSS: @media all and (min-width: 45em) { body:after { content: 'desktop'; display: none; } }
  • 48. Conditional CSS • JS: var size = window.getComputedStyle(document.body,':after').get PropertyValue('content'); if (size == 'desktop') { // Load some more content. } • CSS: @media all and (min-width: 45em) { body:after { content: 'desktop'; display: none; } }
  • 49. Conditional CSS (Example) • CSS: @media all and (min-width: 45em) { body:after { content: 'desktop'; display: none; } } • HTML: <a href="desktop-friendly-version.jpg"> <img src="mobile-version.jpg" data-medium="tablet-friendly-version.jpg" data-large="desktop-friendly-version.jpg" /></a>
  • 50. Conditional CSS (Example) • JavaScript: var size = window.getComputedStyle(document.body,':after').get PropertyValue('content'); if (size == 'desktop') { $('img').each(function(index) { var large = $(this).data('large'); $(this).attr('src',large); } } if (size == 'tablet') {...
  • 55. Gmail’s Lazy Loading • Latency is the time between when a browser requests a resource from a server and when it starts to receive the server’s response. • On mobile, latency is a major UX killer. For a 1Mb page with 85 requests per page, it is 4.5s! • JavaScript is expensive; parsing takes time and blocks the rendering of the page. Usually you don’t need all JavaScript right away.
  • 56. Gmail’s Lazy Loading • Idea: let browsers download all of the JS right away, but evaluate it “on demand”, i.e. when users need a particular feature. • Much of the downloaded JS is commented out, and when needed uncommented and eval-ed. • Gmail’s case: 200 Kb of JS -> 2600 ms page load 200 Kb of JS (lazy loaded) -> 240 ms page load
  • 57. Gmail’s Lazy Loading • <script id="lazy"> // Make sure you strip out (or replace) comment blocks in your JavaScript first. /* JavaScript of lazy module */ </script> <script> function lazyLoad() { var lazyElement = document.getElementById('lazy'); var lazyElementBody = lazyElement.innerHTML; var jsCode = stripOutCommentBlock(lazyElementBody); eval(jsCode); } </script> <div onclick=lazyLoad()>Lazy Load</div>
  • 59. The Two-Click Social Widget • Load social widgets only when user explicitly chooses to take that action to share content. • Idea: load small social icons by default, and load the FB, Twitter and G+ widgets on click. • Cuts down on bandwidth and on latency. (FB button alone weighs 120 Kb + 4 requests).
  • 63. Protecting Image Aspect Ratios • When max-width: 100%; is applied to an image with width and height attributes defined in HTML, image rescales incorrectly. • Solution: add height: auto; for images to which max-width: 100% is applied. • CSS: img, video { max-width: 100%; height: auto; }
  • 64. Intrinsic Ratio For Videos • To ensure the intrinsic 4:3 or 16:9 ratios for videos, we create a box with the proper ratio, then stretch the video inside to fit the dimensions of the box. • HTML: <div class="wrapper-with-intrinsic-ratio"> <div class="element-to-stretch"></div> </div>
  • 65. Intrinsic Ratio For Videos • CSS: .wrapper-with-intrinsic-ratio { position: relative; padding-top: 25px; /* player chrome */ padding-bottom: 56.25%; /* 9:16 = 0.5625 */ height: 0; } .element-to-stretch { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: teal; }
  • 69. Responsive Videos • We can serve different video files to different devices by using media attribute on the video <source> attribute. • Supported in the latest versions of Chrome, Opera, Safari, FF 15+, IE9+, mobile browsers.
  • 70. Responsive Videos • HTML: <video controls preload="none"> <source type="video/mp4" src="video_small.mp4" media="all and (max-width: 480px), all and (max-device-width: 480px)"> <source type="video/webm" src="video_small.webm" media="all and (max-width: 480px), all and (max-device-width: 480px)"> <source type="video/mp4" src="video.mp4"> <source type="video/webm" src="video.webm"> <!-- proper fallback content goes here --> </video>
  • 72. Vertical Media Queries • min-height and max-height are useful for adjusting the font-size, padding, margin and cropping images. • Beware of h/v-media queries collisions when resizing the browser. Things might easily get out of control.
  • 75. Media Queries Splitting • In development, we can use a breakpoint- based organization for CSS (“min-width”): 0-up.css, 450-up.css, 720-up.css etc. • We can also set breakpoints 1px apart and split styles instead of overriding from one media query to the next (“min/max-width”): base.css, 0-449.css, 450-719.css etc.
  • 76. Media Queries Splitting • In practice, it’s often a good starting point to work with em media queries right away. 0-up.css, 25em-up.css, 35em-up.css etc. • If it’s not an option, it’s a good idea to convert px to em for production code to improve maintenance and avoid zooming issues.
  • 80. “ Designing for the Web is like visualizing a tesseract. We build experiences by manipulating their shadows. — Tim Brown
  • 81. Debugging Media Queries • Due to lack of convenient tools, debugging RWD often feels like groping in the dark. There are some popular techniques though. • Setting the body bg color to different colors for each breakpoint. Also box-sizing: border-box. • The * technique for testing for optimal measure in the browser.
  • 85. People like to test a number of metrics to see why people are not * staying on a site. I think sometimes we spend so much time focusin* g on analytics that we have no... * *
  • 86. People like to test a number of metrics to see why people are not * staying on a site. I think sometimes we spend so much time focusin* g on analytics that we have no... * *
  • 89. Typography-Out Approach is an option for building responsive websites.
  • 92. We prepared a series of moodboards to further explore the idea we had, especially to find elements that a new, content-heavy layout could use.
  • 93. We focused specifically on macro- and microtypography as
  • 99. Our design process was defined by one major constraint: perfect measure.
  • 100. If we could adequately typeset an article and thus establish the general context of the design, everything else would follow. [...] The key attribute for achieving perfect typesetting was perfect measure: a good average between 45 and 90 characters per line—on all screen resolutions. — Elliot Jay Stocks, “Smashing Book 3” “
  • 101. So we started looking for typefaces that would best express our new vision, values and our deisgn persona...and oh boy were we excited. We felt like a kid in a candy store... until we had to be thrown into cold shower. With the abundance of rich typefaces on the Web, we excitedly jumped into the myriad of possibilities. We experimented with literally dozens of typefaces from several type foundries in various pairings: we considered Centro Sans and Centro Serif, Meta and Meta Serif, Adelle, Ronnia, LFT Etica, FF Tisa, just to name a few. We observed how they looked at different font sizes and how well they worked together. We examined how well they appeared in bold and italic and in headings and body copy, as well as how they worked in less obvious contexts such as image captions.
  • 103. Typefaces should be optimized for long reading on (many) screens and fit various contexts.
  • 107. We started out with setting up a couple of demo pages for typography, including links, italics, bold. With all design distractions removed, we could pay a great deal of technical attention to the type once we set up our basic styles. How legible is this typeface at a particular size? How well does it perform on Windows? Is there a superior version from an alternative font delivery network that perhaps uses PostScript outlines for display sizes? Focusing on these fine details is much easier when you’re looking purely at the type and nothing else. Because there’s a lot going on visually on Smashing Magazine—screenshots, buttons and noisy ads—a sans-serif felt like a more sensible, uncluttered route for body copy. In fact, it was difficult to imagine a serif typeface being used for code-heavy articles in the coding section.
  • 108. Sorry, Proxima Nova rendering is incorrect on this screenshot, but we lost the original files. :-)
  • 117. We started from mobile, and worked our way upwards to desktop views.
  • 120. Navigation changes: we used two markups: one with select, another with a nested unordered list. and switches them on and off with CSS. The keywords were carefully chosen and tested. We kned that it would take too much space, but we decided to test it and it performed fairly well. We’ve developed a toggle menu here as well, it is currently in the queue for testing. We had drop-down... initially here...
  • 125. We never targeted specific devices— and introduced media queries whenever it felt natural to do so.
  • 126. Responsive design affects viewports and media, including print.
  • 131. Responsive Design Patterns • Responsive design affects all design assets: layout, images, type, navigation, tables, calendars, galleries, forms, maps, ads... • Offline access and mobile UX enhancements complement RWD very well (e.g. HTML5 localStorage, GeoLocation, Telephone links).
  • 143. Responsive Design Patterns • Media queries aren’t supported in Android 2.1 native client, Gmail app on all platforms, Win Mobile 6.1 & Phone 7, BlackBerry OS 5. • Also, Webmail services tend to ignore media queries and overwrite them with their custom CSS code.
  • 147. There are still many unsolved problems.
  • 148. There are still many unsolved problems. Web forms Images Performance Consistency Maintenance Debugging
  • 156. Thank You For Your Attention! @smashingmag
  • 157. Image credits • Front cover: Geometric Wallpapers by Simon C Page (http://simoncpage.co.uk/ blog/2012/03/ipad-hd-retina-wallpaper/) • Homer Simpsons: http://smashed.by/homer, http://smashed.by/crazy-homer