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

XL CSS

XL CSS

Estilos para aplicações de larga-escala significa lidar com necessidades diversas, opiniões diferentes e muitos contribuintes. Se você está no meio dessa bagunça, aí vão algumas dicas e práticas que podem te ajudar - tanto em aplicações grandes, quanto em menores. Como: organizar sistemas e convenções, compartilhar configurações entre componentes, administrar base de assets, gerar diferentes stylesheets de acordo com as necessidades.

Átila Fassina

October 18, 2014
Tweet

More Decks by Átila Fassina

Other Decks in Technology

Transcript

  1. Drill by Daniel Garrett Hickey from The Noun Project Fluorescent

    Light Bulb by Matt Brooks from The Noun Project x manutenção criação $
  2. - baixa curva de aprendizagem - comunidade muito forte ➔

    muitas ferramentas disponíveis .scss
  3. scss |------------ config | |----- _compiler.scss | |------------ settings |

    |---- _settings.scss | |----_helpers.scss | |------------- partials | |--- … | |------------ main.scss Tree by David Chapman from The Noun Project
  4. grunt-shared-config var configRegular = {}; configRegular['modern'] = true, configRegular['standalone'] =

    false, configRegular['mob'] = false, configRegular['font-url'] = "'//cdn.com/fonts/'"; configRegular['update'] = "'update-"+updateTime+"'"; var regularMorph = JSON.stringify(configRegularMorph, null, 4); grunt.file.write('./._tmp/regularConfig.json', regularCSS);
  5. Tree by David Chapman from The Noun Project _settings.scss -

    Cores - Valores padrão ➔ font-family ➔ text color ➔ etc… - Espaçamentos
  6. Tree by David Chapman from The Noun Project _helpers.scss -

    mixins - clearfix - transition - transform - functions - px to rem - placeholders - ...
  7. { "repository": "http://github.com/Framework/center", "name": "center", "description": "tasks, themes and files",

    "version": "1.3.8", "scripts": {}, "dependencies": { "request": "2.34.0" } }
  8. .woff2 ✓ 4.4* .woff ✓ ✓ 9+ ✓ ✓ ✓

    4.4 .ttf/.otf ✓ ✓ ✓ ✓ ✓ ✓ .eot 6-8 .svg ✓ ✓ ✓ 3.x *Chrome only
  9. .woff2 ✓ 4.4* .woff ✓ ✓ 9+ ✓ ✓ ✓

    4.4 .ttf/.otf ✓ ✓ ✓ ✓ ✓ ✓ .eot 6-8 .svg ✓ ✓ ✓ 3.x
  10. @font-face { font-family: 'Ubuntu'; src: url($font-url + 'ubuntu/ubuntu-regular.woff2') format off2'),

    url($font-url + 'ubuntu/ubuntu-regular.woff') format('woff'); font-weight: normal; font-style: normal; }
  11. .woff2 ✓ 4.4* .woff ✓ ✓ 9+ ✓ ✓ ✓

    4.4 .ttf/.otf ✓ ✓ ✓ ✓ ✓ ✓ .eot 6-8 .svg ✓ ✓ ✓ 3.x
  12. @font-face { font-family: 'Ubuntu'; src: url($font-url + 'ubuntu/ubuntu-normal.woff2') format('woff2'), url($font-url

    + 'ubuntu/ubuntu-normal.woff') format('woff'), url($font-url + 'ubuntu/ubuntu-normal.eot) format(eot), url($font-url + 'ubuntu/ubuntu-normal.svg) format(svg); font-weight: normal; font-style: normal; }
  13. Tree by David Chapman from The Noun Project font icons

    - 1 request - 1 cor - difícil manutenção + - - fácil de estilizar - retina friendly
  14. Tree by David Chapman from The Noun Project svg icons

    - múltiplas cores - fácil de estilizar - retina friendly - fácil manutenção - aceita media queries - múltiplas requests + -
  15. Tree by David Chapman from The Noun Project svg sprites

    - múltiplas cores - 1 request - retina friendly - fácil manutenção - aceita media queries - difícil de estilizar + -
  16. @each $icon in $allsets { $collection-name: nth($icon, 1); @if $collection-name

    == $set { $collection-name: convert-stringList($collection-name); $icon-name: nth($icon, 2); .#{$icon-name}16 { @include zaz-icon($icon-collection, #{$icon-name}, 2); } ... }