Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bootstrap: The Right Way

Bootstrap: The Right Way

A compilation of good practices to use Bootstrap.

We do not deliver a cake recipe for you. We will show positive and negative points to be analyzed and used according to the needs of your project.

Luiz Tiago Oliveira

November 29, 2014
Tweet

More Decks by Luiz Tiago Oliveira

Other Decks in Technology

Transcript

  1. Luiz Tiago Software  Developer  @  Wobo  Inc.   CTO  @

     MGR  Tech   Co-­‐founder  Pernambuco.JS  /  jQuery  Brasil   Organizador  Pernambuco.JS  /  Front  in  Recife   Reviewer  da  O’Reilly  &  Novatec
  2. E o harder? Ruby + Python = RuPy Ruby |

    Python | Javascript CSS
  3. Bootstrap: The Right Way Project  leader   2  days  ago

      1  contributor www.bootstraptherightway.com 3  contributors
  4. Download || CDN Requisições em paralelo Reduz tráfego no servidor

    Importa todo o código Não permite customização de variáveis Impossibilita uso de mixins
  5. Variables Grids
 $grid-­‐columns:  12   $grid-­‐gutter-­‐width:  30px Inputs
 $input-­‐border:  #ccc

      $input-­‐border-­‐focus:  #66afe9 Components
 $border-­‐radius-­‐small:  5px Colors
 $body-­‐bg:  #fff   $text-­‐color:  $gray-­‐dark Fonts
 $font-­‐family-­‐sans-­‐serif:  "Helvetica“   $font-­‐size-­‐base:  14px Media  queries  breakpoints   $screen-­‐xs:  480px   $screen-­‐lg:  1200px http://getbootstrap.com/customize/#less-­‐variables
  6. Modules Pequenos  componentes Independentes Flexíveis Facilmente  portáveis Sempre  usando  classes

    Widgets       Carousels       Dialogs       Headers       Datepickers
  7. Overrides Reescrita  :) Customizações Legibilidade  do  código Organização  dos  módulos

    Alerts       Panels         Pagination       Theme Navbar       Sempre  usando  classes
  8. Files structure /stylesheets !"" application.css.sass !"" _variables.css.sass !"" /modules #

    !"" _carousel.css.sass # !"" _dialog.css.sass # $"" ... $"" /overrides !"" _alert.css.sass !"" _form.css.sass !"" _dropdown.css.sass $"" ... Modules Variables Overrides CORE
  9. GRID • Um  dos  módulos  mais  utilizados  do  Bootstrap  

    • Default:  12  columns   • Default:  4  breakpoints   • 12  *  4  =  48  classes  apenas  de  colunas   • 636  linhas  O_O
  10. Bootstrap 4.0 • Updated  grid  system  \o/   • A

     brand  new  component  to  replace  panels,  thumbnails   • A  completely  new,  simpler  navbar  \o/   • Switch  all  pixel  values  over  to  rems  and  ems   • Dropped  support  for  IE8   • Brand  new  documentation  (written  in  Markdown,  too!)   • A  new  approach  to  configuring  global  theming  options