Skip to content

Instantly share code, notes, and snippets.

View john-dave-manuel's full-sized avatar
💻

Dave Manuel john-dave-manuel

💻
View GitHub Profile
@john-dave-manuel
john-dave-manuel / README.md
Created July 1, 2020 07:48 — forked from bikubi/README.md
Simple Purgecss setup for Roots Sage WordPress starter theme

Why

  1. Sage doesn't come with Purgecss (or uncss, etc.)
  2. Say, we use Bulma -- suddenly dist/main.css grows by 400K!
  3. Let's purge it!
  4. Oh dang, we need to whitelist /\.wp-/, /\.post-type/, /myfancylightbox/...
  5. Wait we are whitelisting pretty much everything from /resource/assets/styles!
  6. Isn't there an option to purge /node_modules/**/* only?
  7. Nope.
  8. purgecss start ignore, strategically placed, to the rescue!
@john-dave-manuel
john-dave-manuel / flickity-scrollfix.js
Created March 6, 2020 13:05 — forked from woahdae/flickity-scrollfix.js
Addresses Flickity bug #740 while someone figures out the next real solve
;(function() {
var touchingCarousel = false
, touchStartCoords
document.body.addEventListener('touchstart', function(e) {
if (e.target.closest('.carousel-cell')) {
touchingCarousel = true
} else {
touchingCarousel = false
return