Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jbuffin on github.
  • I am jasonbuffin (https://keybase.io/jasonbuffin) on keybase.
  • I have a public key whose fingerprint is AA84 249E 3347 B0B3 2F9B B167 20F6 38B2 98C7 330C

To claim this, I am signing this object:

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

@jbuffin
jbuffin / gist:be2d90213555416ddbc3
Created November 7, 2014 16:13
PhoneGap Proxy pattern
window.PGProxy = {
navigator : {
camera : {
getPicture : function(a, b, c) {
if(navigator.camera) {
return navigator.camera.getPicture(a, b, c);
} else {
console.log('navigator.camera.getPicture');
a('imageData');
}
@jbuffin
jbuffin / gist:90ba3cb368f2b419c70b
Last active August 29, 2015 14:08
Library pattern
(function MyLibrary(window) {
var privateVar;
function init() {
// do whatever is necessary here
privateVar = 'initial state';
}
function publicMethod() {
// this function is exposed