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

Grids Everywhere

Grids Everywhere

Ivan Banov

May 24, 2016
Tweet

More Decks by Ivan Banov

Other Decks in Technology

Transcript

  1. So, what’s a grid? Any group of line that were

    drawn to guide a design http://waltermattos.com/artigos/grids-no-design-grafico-o-que-voce-precisa-saber-antes-de-comecar-a-usar/
  2. So, what’s a grid? Any group of line that were

    drawn to guide a design http://waltermattos.com/artigos/grids-no-design-grafico-o-que-voce-precisa-saber-antes-de-comecar-a-usar/
  3. Grid anatomy No matter how simple or complex, grids share

    some common parts, the anatomy many times will get similar “blocks” http://vanseodesign.com/web-design/grid-anatomy/
  4. Grid anatomy Format Format is the stage of the design,

    such as the browser window on websites The format defines the live area of a design where type, images, and other media are present http://vanseodesign.com/web-design/grid-anatomy/
  5. Grid anatomy Columns Vertical segments which can be any number

    in a grid, as much as more columns, more flexibility and sometimes harder to work http://vanseodesign.com/web-design/grid-anatomy/
  6. Grid anatomy Rows Rows are the horizontal equivalent of columns.

    Online it’s harder to plan for rows as the height of the format is often inconsistent and dynamic http://vanseodesign.com/web-design/grid-anatomy/
  7. Grid anatomy Gutters Gutters are the spaces separating modules either

    vertically or horizontally http://vanseodesign.com/web-design/grid-anatomy/
  8. Grid anatomy Margins Margins are the negative space between the

    edge of the format and the outer edge of the content http://vanseodesign.com/web-design/grid-anatomy/
  9. Why to use? - Quicker development - Collaborating with other

    developers much easier - Productivity
  10. Why to use? - Quicker development - Collaborating with other

    developers much easier - Productivity - Extremely simpler to work responsiveness
  11. DEV x Designer The BEST solution is always the closest

    approach between the design and the code
  12. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention
  13. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention - CSS technique
  14. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention - CSS technique - Relative and absolute columns
  15. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention - CSS technique - Relative and absolute columns - Mixins and helpers
  16. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention - CSS technique - Relative and absolute columns - Mixins and helpers - Breakpoints
  17. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention - CSS technique - Relative and absolute columns - Mixins and helpers - Breakpoints - Media query manager
  18. Define a strategy First of all it’s needed to define

    how the grid will work - Class names convention - CSS technique - Relative and absolute columns - Mixins and helpers - Breakpoints - Media query manager - Handling common problems
  19. Define a strategy Class names convention Columns Sizes .col /

    .column .small-6 / .sm-3 / .col-sm-1 .col-sm-2-3 / .column-1-6.large .column.six.wide.device
  20. Define a strategy .breakpoint-X .column .row / .row.column .grid .col-breakpoint-N

    .col-breakpoint-N-N CSS technique This is an important point where should be decided the classes responsibilities
  21. Define a strategy Relative and absolute columns <div class="grid"> <div

    class="column small-4"></div> <div class="column small-4"></div> <div class="column small-4"></div> </div>
  22. Define a strategy Relative and absolute columns <div class="grid"> <div

    class="column small-1-4"></div> <div class="column small-1-4"></div> <div class="column small-2-4"></div> </div> <div class="grid"> <div class="col-sm-1-4"></div> <div class="col-sm-1-4"></div> <div class="col-sm-2-4"></div> </div>
  23. Define a strategy Relative and absolute columns <div class="flexgrid"> <div

    class="column"></div> <div class="column"></div> <div class="column"></div> </div> <div class="gridbox-3"> <div class="column"></div> <div class="column"></div> <div class="column"></div> </div>
  24. Define a strategy Offsets .pull / .push Aligment .center /

    .end Block control .stack / .relaxed Mixins and helpers Here comes the classes and mixins that help the grid to fit in all the situations that the design would like to create
  25. Define a strategy Column generator column(small, 6) columnSize(4) Grid grid(3)

    Mixins and helpers Here comes the classes and mixins that help the grid to fit in all the situations that the design would like to create
  26. Define a strategy $breakpoints = { small : 320px, medium

    : 768px, large : 992px, wide : 1440px } Breakpoints Even knowing the most common sizes of devices The breakpoints whenever possible should be defined with the design team
  27. Define a strategy media(small, true) media(small, large) Block code +media(medium)

    { prop: value; } Media query manager Define how the mixin for media queries will work is extremely important