introduction to bootstrap: design for developers

33
Bootstrap 101 Introduction to one of the most popular front-end frameworks

Upload: melvin-john

Post on 16-Apr-2017

1.027 views

Category:

Internet


11 download

TRANSCRIPT

Page 1: Introduction to Bootstrap: Design for Developers

Bootstrap 101Introduction to one of the most popular front-end frameworks

Page 2: Introduction to Bootstrap: Design for Developers

Design for DevelopersIntroduction and Overview

Page 3: Introduction to Bootstrap: Design for Developers

Basic Principles of DesignProximity AlignmentRepetition Contrast

BonusColour Typography

Page 4: Introduction to Bootstrap: Design for Developers

ProximityThe way elements are grouped together creates a sense of unity. Closeness implies a relationship.

Page 5: Introduction to Bootstrap: Design for Developers

Proximity Some examples

A menu of list that belong to a category

PLATFORMPlaystation 4XBOX OneXBOX 360Nintendo WiiGENREActionAdventureFirst-Person ShooterRole Playing GameSIZESmallMediumLarge

PLATFORMPlaystation 4XBOX OneXBOX 360Nintendo Wii

GENREActionAdventureFirst-Person ShooterRole Playing Game

SIZESmallMediumLarge

Page 6: Introduction to Bootstrap: Design for Developers

AlignmentElements should not be placed arbitrary.Place elements in relation to others.

Page 7: Introduction to Bootstrap: Design for Developers

Alignment Some examples

Aligning elements horizontally and vertically .(and some proximity too)

Page 8: Introduction to Bootstrap: Design for Developers

Alignment Some examples

Tetris Fail

Page 9: Introduction to Bootstrap: Design for Developers

Alignment The Grid

A network of uniformly spaced horizontal and perpendicular lines.

Page 10: Introduction to Bootstrap: Design for Developers

Alignment The Golden Ratio

Divine proportion1.61803398875

Page 11: Introduction to Bootstrap: Design for Developers

RepetitionRepeat elements, styles and design consistency•Font-size and Family across headers and text•Bullet styles•Color•Borders/Styles•Margins/Paddings

Page 12: Introduction to Bootstrap: Design for Developers

Repetition An example

www.britishairways.com

Page 13: Introduction to Bootstrap: Design for Developers

ContrastWhen two items are different, it creates contrast.

Sort of different is not different, it’s conflict.

REALLY Different!

Page 14: Introduction to Bootstrap: Design for Developers

Contrast Good & Bad

Contrast, Contrast and Contrast

Page 15: Introduction to Bootstrap: Design for Developers

ColorColor can be very emotional (psychology) or scientific (theories and schemes)

Associations, Temperatures, Models, Color wheels and schemes

Page 16: Introduction to Bootstrap: Design for Developers

TypographyFonts to the rest of us.

Typography matters.Web fonts are free and well supported.(and don’t use decorative fonts, even if they’re cute)

Page 17: Introduction to Bootstrap: Design for Developers

Typography In Ten Minutes

practicaltypography.com

1. BODY TEXT

2. POINT SIZE

3. LINE SPACING

4. LINE LENGTH

5. FONT

More text than anything. Focus on that first. 80/20 Rule

CSS: font-size

CSS: line-height

CSS: width of the container

CSS: font-family(don’t use system fonts!)

Page 18: Introduction to Bootstrap: Design for Developers

TypographyWeb Fonts!

There’s good free resources! Paid for services aren’t expensive.

Limit your fonts. Browser support is good, but still use fallback fonts.

Page 19: Introduction to Bootstrap: Design for Developers

BootstrapMost popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.

Page 20: Introduction to Bootstrap: Design for Developers

What is Bootstrap?Sleek, Intuitive, and powerful Mobile first Front-End Framework•Style guide for HTML Markup•Common web design and layout patterns (CSS)•Common widgets and functionality (JS)•Faster and easier web development

Created by Mark Otto and Jacob Thornton when working @Twitter to encourage consistency across internal tools and speed up development

Page 21: Introduction to Bootstrap: Design for Developers

Bootstrap: Getting Started• Getting started is as simple as dropping some

CSS and Javascript into the root of your site.• Customize variables, components, Javascript

plugins and more. http://getbootstrap.com/customize/• The fastest way is to download the compiled

and minified versions of our CSS and Javascript, along with the included fonts.

http://getbootstrap.com/getting-started/• CDN (Content Delivery Network) http://www.bootstrapcdn.com/

Page 22: Introduction to Bootstrap: Design for Developers

Bootstrap: Basic Template<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 101 Template</title> <link href="css/bootstrap.min.css" rel="stylesheet"> </head> <body> <h1>Hello, world!</h1>

<script src= "ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script> <script src="js/bootstrap.min.js"></script> </body> </html>

Page 23: Introduction to Bootstrap: Design for Developers

The Grid12 column Advanced Grid

<div class=“container”><!-- every row must have 12 columns --> <div class=“row”> <div class=“col-md-4”>

<!– content --> </div> <!– 8 more columns --> </div></div>

Page 24: Introduction to Bootstrap: Design for Developers

The Grid12 column Advanced Grid

Bootstrap 3 features an always-responsive grid with a maximum size:

1.col-xs-* grids have no maximum size (auto) <768px (Extra Small Devices)2.col-sm-* grids resize ≥768px (Small Devices)3.col-md-* grids resize ≥992px (Medium Devices)4.col-lg-* grids resize ≥1200px (Large Devices)

You should choose col-md or col-lg for desktop sites

Page 25: Introduction to Bootstrap: Design for Developers

The GridYou can use two grid sizes for different screen sizes:

<div class=“row”> <div class=“col-md-4 col-xs-6”>

<!-- content --> </div> <div class=“col-md-8 col-xs-6”>

<!-- content --> </div></div>

Page 26: Introduction to Bootstrap: Design for Developers

Bootstrap: CSS• Typography• Tables• Forms• Buttons• Images

http://getbootstrap.com/css/

Page 27: Introduction to Bootstrap: Design for Developers

Bootstrap: ComponentsOver a dozen reusable components

•Glyphicons•Dropdowns•Navbar•Breadcrumbs•Alerts

http://getbootstrap.com/components/

Page 28: Introduction to Bootstrap: Design for Developers

Bootstrap: JavascriptBrings components to life with custom plugins•Modals•Tabs•Tooltips•Alerts•Carousel

http://getbootstrap.com/javascript/

Page 29: Introduction to Bootstrap: Design for Developers

Bootstrap: Customize and Download• Customize Bootstrap’s components,

LESS variables and jQuery plugins to get your very own version.

http://getbootstrap.com/customize/

Page 30: Introduction to Bootstrap: Design for Developers

How Bootstrap relates to Design Principles• Proximity : Designer’s responsibility• Alignment : 12 column advanced grid• Repetition : Default typography, Buttons, Classes• Contrast : Designer’s responsibility, but

components have decent contrast• Color : Designer still needs to craft a color palette• Typography: Default provided, designer may have

to use web fonts.

Page 31: Introduction to Bootstrap: Design for Developers

Benefits• Faster prototyping and development• Powerful Grid• Easily Customizable and Well tested Styles• Mobile first/ Responsive Components• Nearly Perfect Documentation• Huge Community Support

Page 32: Introduction to Bootstrap: Design for Developers

Drawbacks• Overhead (v3 not bad: 127k => 92k CSS + 28k JS)• Bootstrap design looks like Bootstrap design• ‘DIV Bloat’ if you’re not careful or don’t fully customize

Page 33: Introduction to Bootstrap: Design for Developers

@melvindidit