responsive design and retina displays

38
Responsive Design and Retina Displays “Things done changed.” -web designer/rapper (The Notorious BIG)

Upload: eli-mcmakin

Post on 27-Nov-2014

9.684 views

Category:

Technology


0 download

DESCRIPTION

These are the slides for the Austin Adobe User Group presentation on Responsive Web Design and Retina Displays on 9/14/12. The code example files are at: https://github.com/elimc/AAUG-RWD-and-Retina_9-14-12

TRANSCRIPT

Page 1: Responsive design and retina displays

Responsive Design and Retina Displays

“Things done changed.”-web designer/rapper (The Notorious

BIG)

Page 2: Responsive design and retina displays

“Work harder, not smarter.”-Doug McMakin

Before we begin . . .

Page 3: Responsive design and retina displays

In 2012, what do we target?

Page 4: Responsive design and retina displays
Page 5: Responsive design and retina displays
Page 6: Responsive design and retina displays
Page 7: Responsive design and retina displays

Responsive design attempts to solve the

problem of targeting our design to the device that it is being displayed on.

www.bostonglobe.com

What is responsive design?

Page 8: Responsive design and retina displays

Seminal article on A List Apart on May 25,

2010 http://www.alistapart.com/articles/responsive-

web-design/

Ethan Marcotte

Page 9: Responsive design and retina displays

We will be using HTML5, because it’s the

future and we should at least be using structural elements https://github.com/h5bp/html5-boilerplate

We will be using normalize.css https://github.com/necolas/normalize.css

Let’s do some code!

Page 10: Responsive design and retina displays

<meta name="viewport"

content="width=device-width">

Force correct display in phones!

Page 11: Responsive design and retina displays
Page 12: Responsive design and retina displays

Media queries added in CSS3 Allows “adaptive” design@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {

background: red;}

Media Queries are magic

Page 13: Responsive design and retina displays

http://css-tricks.com/snippets/css/media-queri

es-for-standard-devices/

Common sizes

Page 14: Responsive design and retina displays

Control what gets displayed at certain

resolutions

Using display: none;

Page 15: Responsive design and retina displays

Allow the web site to “respond” to screen sizes Allows “responsive” design

Max-width & min-width

Page 16: Responsive design and retina displays

img {

max-width: 98%; /* Changes the image size with 1:1 ratio. */padding: 1%; }

Images

Page 17: Responsive design and retina displays

Allows the components of the site to scale

proportionally with screen size Again “responsive” design

Use percentages

Page 18: Responsive design and retina displays

https://github.com/Automattic/_

s/blob/master/js/small-menu.js http://css-tricks.com/

Navigation is challenging

Page 19: Responsive design and retina displays

http://responsive.is/bostonglobe.com

Testing your new site

Page 20: Responsive design and retina displays

Fortunately, there is a lot of help on the

Internet http://mediaqueri.es/ Google stuff! Go out and code!

Responsive design is challenging

Page 21: Responsive design and retina displays

Questions about responsive design?

Page 22: Responsive design and retina displays

Introduced with the iPhone 4 Many desktop displays have 92-120ppi iPhone 5 has 326ppi

At distance of 12in, people with normal visions can’t see the pixels

http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density

Retina displays

Page 23: Responsive design and retina displays
Page 24: Responsive design and retina displays
Page 25: Responsive design and retina displays

Different displays ppi

Page 26: Responsive design and retina displays
Page 27: Responsive design and retina displays

Being released on Oct, 8 Will support high DPI I suspect it will usher in crazy new products

Windows 8

Page 28: Responsive design and retina displays
Page 29: Responsive design and retina displays
Page 30: Responsive design and retina displays
Page 31: Responsive design and retina displays

How do we make things look good on high-dpi

screens but not take to long to load on low-dpi screens?

Retina brings challenges

Page 32: Responsive design and retina displays

Make the image 1.3x it’s normal size Doesn’t look too bad on retina screens Only takes slightly longer to download Great for non-vector images

Make big images

Page 33: Responsive design and retina displays

Scalable Vector Graphics can scale without

issue But they don’t work well with non-vector

images Not well supported yet.

SVGs

Page 34: Responsive design and retina displays

CSS can scale without any resolution issues

Excellent solution Can solve some generic designs

Custom fonts can be download to create scale-free icons https://

github.com/blog/1106-say-hello-to-octicons Technically challenging Doesn’t seem to display multiple colors easily

Text and CSS elements

Page 35: Responsive design and retina displays

http://retinajs.com/ Prevents non-retina browsers from

downloading large images Doesn’t prevent retina displays from

downloading small images

Retina.js

Page 36: Responsive design and retina displays

@media only screen and (-moz-min-device-pixel-

ratio: 2), only screen and (-webkit-min-device-pixel-

ratio: 2), only screen and (min-device-pixel-ratio: 2) { #icon { background-image: url([email protected]); background-size: 16px auto; } }

Let’s code!

Page 37: Responsive design and retina displays

The standards are still in limbo

Keep yourself educated

Page 38: Responsive design and retina displays

Questions?