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

BrazilJS 2014 Talk

BrazilJS 2014 Talk

Cleaning huge CSS with JS. A different approach to clean up massive CSS sets n complex commerce websites.

Mauricio Wolff

August 22, 2014

More Decks by Mauricio Wolff

Other Decks in Programming


  1. cssi --css [file] --repo [repo] Getting css: css/sampl…_profile.css… Parsing 2.25

    kB of CSS... The original CSS has 21 selectors ! Getting nested, removing :pseudos and duplicates, 20 were found (1 ids 19 classes)
  2. cssi --css [file] --repo [repo] Executing git-grep on [repo] for

    each selector ! NOT FOUND: [class] .uc-notification-promo ! 3
  3. cssi --css [file] --repo [repo] Now git logs will be

    checked against the ghosts ! This could take some time, go grab a ! Latest trace of .uc-notification-promo: 8b547f5 signin prompt, WL-186 SR filters - Wolff
  4. cssi --reverse --reverse option detected, will be passed to git-log

    ! First 8b547f5 signin prompt, WL-186 SR filters - Wolff
  5. [UX HACKATHON] time - Nicolò Bertoncin people - Scott Lewis

    languages - Lek Potharam money - Daniele Catalanotto / ECAL scale - athanagore x git - Dmitry Baranovskiy dashboard - Björn Andersson hand - Maico Amorim ghost - nikki rodriguez steps - Jule Steffen & Matthias Schmidt cc - Five by Five All by thenounproject.com ?