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

High Speed Workflow

High Speed Workflow

Talk apresentada na décima primeira edição do Meetup CSS SP realizada no auditório da Viva Real.

Vitor Mendrone

December 10, 2015
Tweet

More Decks by Vitor Mendrone

Other Decks in Programming

Transcript

  1. Variáveis Mixins Loops & Condicionais Nesting Media Queries Maths Importing

    Extends / Placeholders Color Manipulation @content / Block Mixins
  2. // Alinha blocos relativamente ao seu container (pos. absolute) align()

    // Semelhante a propriedade order do flexbox shift() unshift() // Adiciona um background aos elementos para facilitar a visualização da grid edit() // Facilita a centralização de containeres center() uncenter() // Posiciona elementos uns sobre os outros (ideal para mobile) stack() unstack() // Aplica o clearfix de Nicholas Gallagher cf()
  3. +mobile() // <= 400px +tablet() // > 400px && <=

    1050px +desktop() // > 1050px +hd() // > 1800px
  4. rupture.scale = 0 400px 800px 1024px +at(1) // 0 to

    400px +at(2) // 400px to 800px +at(3) // 800px to 1024px
  5. SIM

  6. $ npm i -g gulp jeet $ npm i --save-dev

    gulp gulp-stylus jeet rupture gulp-plumber
  7. 'use strict'; var gulp = require('gulp'), stylus = require('gulp-stylus'), jeet

    = require('jeet'), rupture = require('rupture'), plumber = require('gulp-plumber'); gulp.task('stylus', function(){ gulp.src('style.styl') .pipe(plumber()) .pipe(stylus({ use: [jeet(), rupture()] })) .pipe(gulp.dest('css')) }) gulp.task('default', function(){ gulp.start('stylus') })
  8. <h1>Exemplo Jeet & Rupture</h1> <p>Mobile First</p> <hr> <br> <div class="container">

    <section> <div> <h3>Coluna 1</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, eum, inventore.</p> </div> <div> <h3>Coluna 2</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, eum, inventore.</p> </div> <div> <h3>Coluna 3</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, eum, inventore.</p> </div> <div> <h3>Coluna 4</h3> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, eum, inventore.</p> </div> </section> </div>
  9. @import 'jeet' box-style() box-sizing border-box border 1px solid #ccc margin-bottom

    10px body margin 0 padding 0 text-align center font-family Arial, "Helvetica Neue", Helvetica, sans-serif line-height 1.5 h1 font-weight 600 h3, h4 font-weight normal p, h3 font-style italic