Session I – Responsive Web Design (RWD) Overview 8/31/2015

Slides:



Advertisements
Similar presentations
What is jQuery Mobile? How to use it? Doncho Minkov Telerik Corporation Technical Trainer.
Advertisements

Media Queries Jeffery Davis CIT media is used to define different style rules for different media types and devices. Media queries.
Responsive Web Design Sheri German, Instructor Montgomery College.
Responsive Web Design Design websites so that they can adapt to different devices seamlessly. Image by Muhammed RafizeldiMuhammed Rafizeldi.
RESPONSIVE DESIGN Sources: Kadlec, T. (2012). Implementing responsive design. Berkeley, California: New Riders Publishing. MarcotteMarcotte, E. (2010).
CISC 474: Advanced Web Technologies HTML5 & CSS3, & Responsive Design.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 12: Building Responsive Webpages.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
Mobile Web Development Strategies Best Practices Performance Tips.
Lesson 15: Mobile Design and Layout Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
COMP 135 Web Site Design Intermediate Week 8. Responsive Web Design Responsive Design Adaptive Design.
Martin Kruliš by Martin Kruliš (v1.0)1.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Textbook to be published by Pearson Ed in early Bootstrap.
Front-end framework 1.
Web Development & Design Foundations with HTML5
CSCI 1720 W3.CSS – Part 1 East Tennessee State University Department of Computing CSCI 1720 Intermediate Web Design.
CNIT131 Internet Basics & Beginning HTML
Implementing Responsive Design
HTML5 Level II Session V Chapter 8 - How to Use Responsive Web Design (RWD)
A better approach to mobile
Advanced Web Page Styling
Responsive Design and Twitter Bootstrap
Responsive Web Pages.
Introduction to CSS Media Query - Lesson 11
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Introduction to Bootstrap Bootstrap සදහා හැදින්වීම
Web Development & Design Foundations with HTML5
CS 0134 (term 2181) Jarrett Billingsley
RESPONSIVE WEB DESIGN.
CS3220 Web and Internet Programming Introduction to Bootstrap
IS1500: Introduction to Web Development
CSS part 2 Outro.
Responsive Design.
HTML5 Level III Responsive Web Design (RWD) and Front-End Frameworks
CSS BEST PRACTICES.
Course Review HTML5 Level II Course Review
Course Review HTML5 Level II Course Review
HTML5 Level I Session III
HTML5 Level I Session III
Session I Chapter 18 - How to Design a Web Site
CMP Creating Your Personal and Small Business Web Sites
HTML5 Level I Session I Chapter 1 - Introduction to Web Development
Anatomy of an App User Interface Design
Course Review ITI HTML5 Level II Course Review
Session VI Chapter 8 - How to Use Responsive Web Design (RWD)
Chapter 8 - How to Use Responsive Web Design (RWD)
Secure Web Programming
HTML5 Level III Responsive Web Design (RWD) and Front-End Frameworks
Responsive Web Design (RWD)
ITI 239 HTML5 Desktop and Mobile Level I
HTML5 Level I CyberAdvantage
Course Review HTML5 Level II Course Review
Chapter 7 Absolute/relative hyperlinks Frag id 3-column site
Course Review HTML5 Level II Course Review
CS3220 Web and Internet Programming Introduction to Bootstrap
HTML5 Level III Responsive Web Design (RWD) and Front-End Frameworks
ITI 163: Web, Mobile, and Social Media Design Introduction
Web Page Layout Imran Rashid CTO at ManiWeber Technologies.
Web Client Side Technologies Raneem Qaddoura
Web Development & Design Foundations with HTML5
Web Client Side Technologies Raneem Qaddoura
Session IV Chapter 20 - How to use SASS and Less
HTML5 Level I CyberAdvantage
ITI 133: HTML5 Desktop and Mobile Level I
CMP Creating Your Personal and Small Business Web Sites
Course Review HTML5 Level I Course Review
17 RESPONSIVE WEB DESIGN.
Christopher Harrison Jeremy Foster
ITI 133: HTML5 Desktop and Mobile Level I
Presentation transcript:

ITI 256 HTML5 Level III Responsive Web Design (RWD) and Front-End Frameworks Session I – Responsive Web Design (RWD) Overview http://www.profburnett.com 8/31/2015 Copyright © Carl M. Burnett

Class Outline Next – Session II Responsive Web Design (RWD) Flexible Layouts Media Queries Mobile First Flexible Media Strategy & Structure Style Architecture Performance Driven Selectors Reusable Code Minify & Compress Files Reduce HTTP Requests Cache Common Files RWD Front-End Frameworks HTML5 Frameworks CSS3 Frameworks JavaScript Frameworks Mobile Frameworks Exercise 2 Next – Session II 8/31/2015 Copyright © Carl M. Burnett

Responsive Web Design (RWD) 8/31/2015 Copyright © Carl M. Burnett

Responsive Web Design (RWD) Flexible images are also sized in relative units, so as to prevent them from displaying outside their containing element. 8/31/2015 Copyright © Carl M. Burnett

<meta name="viewport" content="initial-scale=1, maximum-scale=1 Viewports Viewport Basics <meta name="viewport" content="width=device-width, initial-scale=1"> Viewport width and screen width <meta name="viewport" content="initial-scale=1, maximum-scale=1 Common viewport sizes for mobile and tablet devices Ref: https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag 12/31/2018 Copyright © Carl M. Burnett

Viewport Viewport Height & Width Viewport Scale Viewport Resolution Combining Viewport Values Ref: http://learn.shayhowe.com/advanced-html-css/responsive-web-design/#viewport 8/31/2015 Copyright © Carl M. Burnett

Viewport Height & Width vw - Viewport width vh - Viewport height vmin - Minimum of the viewport’s height and width vmax - Maximum of the viewport’s height and width 8/31/2015 Copyright © Carl M. Burnett

Viewport Viewport Scale minimum-scale maximum-scale initial-scale user-scalable 8/31/2015 Copyright © Carl M. Burnett

Viewport Viewport Resolution target-densitydpi device-dpi high-dpi medium-dpi low-dp 8/31/2015 Copyright © Carl M. Burnett

Viewport CSS @viewport { width: device-width; zoom: 1; } Some browser do not support unless updated by Modernizer 8/31/2015 Copyright © Carl M. Burnett

Responsive Design Built-In Responsiveness Responsive Grid Ref: http://www.w3schools.com/w3css/w3css_responsive.asp Ref: http://www.w3schools.com/w3css/w3css_grid.asp 12/31/2018 Copyright © Carl M. Burnett

Flexible Grid CSS HTML .container { width: 538px; } section, aside { margin: 10px; section { float: left; width: 340px; float: right; width: 158px; <div class="container"> <section>...</section> <aside>...</aside> </div> 8/31/2015 Copyright © Carl M. Burnett

Flexible Grid CSS .container { width: 538px; } section, aside { margin: 10px; section { float: left; width: 340px; float: right; width: 158px; section, aside { margin: 1.858736059%; /* 10px ÷ 538px = .018587361 */ } section { float: left; width: 63.197026%; /* 340px ÷ 538px = .63197026 */ float: right; width: 29.3680297%; /* 158px ÷ 538px = .293680297 */ 8/31/2015 Copyright © Carl M. Burnett

Responsive Web Design (RWD) Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, most commonly the width of the browser. 8/31/2015 Copyright © Carl M. Burnett

Media Queries Initializing Media Queries HTML CSS <!-- Separate CSS File --> <link href="styles.css" rel="stylesheet" media="all and (max-width: 1024px)"> CSS /* @media Rule */ @media all and (max-width: 1024px) {...} /* @import Rule */ @import url(styles.css) all and (max-width: 1024px) {...} Ref: http://learn.shayhowe.com/advanced-html-css/responsive-web-design/#media-queries 8/31/2015 Copyright © Carl M. Burnett

Media Queries Logical Operators in Media Queries - and, not, and only. @media all and (min-width: 800px) and (max-width: 1024px) {...} @media not screen and (color) {...} @media only screen and (orientation: portrait) {...} 8/31/2015 Copyright © Carl M. Burnett

Media Queries Media Features in Media Queries width and height of the viewport width and height of the device orientation (is the tablet/phone in landscape or portrait mode?) resolution Using Minimum & Maximum Prefixes min - values of greater than or equal to max - value of less than or equal to. 8/31/2015 Copyright © Carl M. Burnett

Media Queries CSS3 Media Types Value Description all Used for all media type devices print Used for printers screen Used for computer screens, tablets, smart-phones etc. speech Used for screenreaders that "reads" the page out loud 8/31/2015 Copyright © Carl M. Burnett

Media Queries Breakpoints RESPONSIVE DESIGN.is W3Schools Responsive Web Design - Media Queries Screen Resolutions CSS-Tricks 8/31/2015 Copyright © Carl M. Burnett

Flexible Media Flexible Media Demo Flexible Embedded Media max-width property Flexible Embedded Media Demo iframe Flexible Embedded Media Workaround Ref: http://learn.shayhowe.com/advanced-html-css/responsive-web-design/#flexible-media 8/31/2015 Copyright © Carl M. Burnett

Strategy & Structure 8/31/2015 Copyright © Carl M. Burnett

Strategy & Structure Style Architecture Performance Driven Selectors Reusable Code Minify & Compress Files Reduce HTTP Requests Cache Common Files Ref: http://learn.shayhowe.com/advanced-html-css/performance-organization/ 8/31/2015 Copyright © Carl M. Burnett

Style Architecture Responsive Web Design (RWD) Object Oriented CSS (OOCSS) Scalable & Modular Architecture for CSS (SMACSS) Adaptive Web Design (AWD) Responsive Server Side Components (RESS) 8/31/2015 Copyright © Carl M. Burnett

Object Oriented CSS Separation of Structure From Skin Separation of Containers and Content The Benefits Of OOCSS Faster Websites Maintainable Stylesheets Ref: http://www.smashingmagazine.com/2011/12/an-introduction-to-object-oriented-css-oocss/ 8/31/2015 Copyright © Carl M. Burnett

Scalable & Modular Architecture for CSS Categorizing CSS Rules Base Layout Module State Theme Depth of Applicability Selector Performance HTML5 and SMACSS Prototyping Preprocessors Drop the Base The Icon Module Complicated Inheritance Ref: https://smacss.com/ 8/31/2015 Copyright © Carl M. Burnett

Adaptive Web Design Three layers of Progressive Enhancement Content layer = rich semantic HTML markup Presentation layer = CSS and styling Client-side scripting layer = JavaScript or jQuery behaviors Ref: http://www.techrepublic.com/blog/web-designer/what-is-the-difference-between-responsive-vs-adaptive-web-design/ 8/31/2015 Copyright © Carl M. Burnett

Responsive Server Side Components (RESS) Server-side components (RESS) in conjunction with client-side ones such as media queries can produce faster-loading sites for access over cellular networks and also deliver richer functionality/usability avoiding some of the pitfalls of device-side-only solutions. 8/31/2015 Copyright © Carl M. Burnett

Performance Driven Selectors Favor Classes Keep Selectors Short /* Bad */ header nav ul li a {...} /* Good */ .primary-link {...} button strong span {...} button strong span .callout {...} button span {...} button .callout {...} /* Bad */ #container header nav {...} /* Good */ .primary-nav {...} article.feat-post {...} .feat-post {...} Ref: http://learn.shayhowe.com/advanced-html-css/performance-organization/#performance-driven-selectors 8/31/2015 Copyright © Carl M. Burnett

Reusable Code /* Bad */ .news { background: #eee; border-radius: 5px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); } .social { /* Good */ .news, .social { background: #eee; border-radius: 5px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); } /* Even Better */ .modal { background: #eee; border-radius: 5px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); } Ref: http://learn.shayhowe.com/advanced-html-css/performance-organization/#reusable-code 8/31/2015 Copyright © Carl M. Burnett

Minify & Compress Files gzip Compression - .htaccess file Measuring Compression FireFox – Firebug Chrome – Web Inspector Image Compression ImageOptim for Mac PNGGauntlet for Windows. Ref: http://learn.shayhowe.com/advanced-html-css/performance-organization/#minify-compress-files 8/31/2015 Copyright © Carl M. Burnett

Reduce HTTP Requests Combine Like Files Image Sprites Image Data URI AJAX Ref: http://learn.shayhowe.com/advanced-html-css/performance-organization/#reduce-http-requests 8/31/2015 Copyright © Carl M. Burnett

Cache Common Files ExpiresByType text/css "access plus 1 year" ExpiresByType application/javascript "access plus 1 year" Ref: http://learn.shayhowe.com/advanced-html-css/performance-organization/#performance-driven-selectors 8/31/2015 Copyright © Carl M. Burnett

RWD Front-End Frameworks 8/31/2015 Copyright © Carl M. Burnett

RWD Front-End Frameworks HTML5 Frameworks CSS3 Frameworks JavaScript Frameworks Mobile Frameworks Webflow Initializer 8/31/2015 Copyright © Carl M. Burnett

HTML5 Frameworks HTML KickStart HTML5 Boilerplate http://www.getskeleton.com/Skeleton Montagejs Zebra 8/31/2015 Copyright © Carl M. Burnett

CSS3 Frameworks: Stylesheet Languages W3.CSS Responsive Foundation Sass (Syntactically Awesome Stylesheets) LESS (Leaner CSS) Stylus W3.CSS Responsive Foundation Bootstrap Toast Yaml Gumby Less Framework Susy Kube CSS Framework Comparison 8/31/2015 Copyright © Carl M. Burnett

JavaScript Frameworks jQuery Dojo MooTools Wakanda Comparison of JavaScript frameworks 8/31/2015 Copyright © Carl M. Burnett

Mobile Frameworks jQuery Mobile Sencha Touch Kendo UI Mobile Chocolate Chip UI mobile-frameworks-comparison-chart.com 8/31/2015 Copyright © Carl M. Burnett

Responsive Web Design (RWD) Webflow is one of the few professional sitebuilders that lets you build sites responsively. You can use it for free. 8/31/2015 Copyright © Carl M. Burnett

Initializr Initializr is an HTML5 templates generator Classic HTML5 Boilerplate Responsive Bootstrap 8/31/2015 Copyright © Carl M. Burnett

Exercise 2 Review Site Requirements Review Examples of Frameworks Continue completion of RWD Website Planning Worksheet 8/31/2015 Copyright © Carl M. Burnett

Class Review Next – Session II Responsive Web Design (RWD) Flexible Layouts Media Queries Mobile First Flexible Media Strategy & Structure Style Architecture Performance Driven Selectors Reusable Code Minify & Compress Files Reduce HTTP Requests Cache Common Files RWD Front-End Frameworks HTML5 Frameworks CSS3 Frameworks JavaScript Frameworks Mobile Frameworks Webflow Initializer Next – Session II 8/31/2015 Copyright © Carl M. Burnett