responsive design

14
Responsive Design Ombu Labs, April 2015

Upload: ombu-labs-the-lean-software-boutique

Post on 05-Aug-2015

73 views

Category:

Design


0 download

TRANSCRIPT

Page 1: Responsive design

Responsive Design Ombu Labs, April 2015

Page 2: Responsive design

Develop a website design that helps the lay out to get changed according to the screen resolution.

It is centered around fluidity, flexibility and adaptability.

Page 3: Responsive design

Screen ResolutionResolutions can be defined in an assortment of

breakpoints, but there are several major sizes that you need to focus on more than any others.

1024px / 768px / 480px / 320px

Page 4: Responsive design

Mobile First• It is a methodology: build the small screen first and then progressively modify the layout as more screen space becomes available. • Only the minimum required files are loaded • It is Ideal for mobile devices that don’t support media

queries.

Page 5: Responsive design

Content Focus• Design with the content that will be used for the

final site • Understand how the content will be layed out in

your small screen • Let the content define the breakpoints

Page 6: Responsive design

Media QueriesThe @media rule is used to define different style rules

for different media types/devices (CSS3) !

Media queries are: logical if statements. "If" these things are true about the browser, use the CSS inside

Page 7: Responsive design

Source: caniuse.com

Page 8: Responsive design

@media widthProportional Media Queries,

based on relative units, no fixed width Relative to the ‘font-size’ value

!@media all and (min-width: 41em)

Page 9: Responsive design

@media valuesThere are some other values that can be used

!@media all and (min-width: 41em) and (orientation:landscape) and (min-height:60em){! color: #000000;!}

Page 10: Responsive design

@media logicWe can use not, and & only to be more specific

!@media (min-width: 41em) and (orientation:landscape){! color: #000000;!}!

Page 11: Responsive design

@media orderStart we narrower viewports if it is mobile first

@media (min-width: 48em) {background: blue;}!@media (min-width: 80em) {background: red;}!

!If not, you have to use max-width

@media (max-width: 80em) {background: blue;}!@media (max-width: 48em) {background: red;}!

Page 12: Responsive design

SASS!

Breakpoints can be set as variables $breakpoint-1 : 24em;

$breakpoint-2 : 46.8em; $breakpoint-3 : 50em; $breakpoint-4 : 73em;

@media (max-width: $breakpoint-4) !{background: blue;}!

Page 13: Responsive design

More!• www.w3schools.com/cssref/css3_pr_mediaquery.asp • developer.mozilla.org/es/docs/CSS/Media_queries • caniuse.com • responsivedesign.is • breakpoint-sass.com

Page 14: Responsive design

THANK YOU! !

questions?