Skip to content

Instantly share code, notes, and snippets.

View james-jlo-long's full-sized avatar

James Long james-jlo-long

View GitHub Profile
<?php
class Foo {
public function __construct($name) {
$this->name = $name;
}
@james-jlo-long
james-jlo-long / outline.md
Last active November 14, 2016 21:17
Your CSS Sucks

Your CSS sucks

Contents

  • Styles aren't modular
  • Confused content and container
  • Not re-using styles
  • Changing too much
  • No naming convention
@james-jlo-long
james-jlo-long / grid.less
Created March 12, 2014 12:48
Liquid grid in LESS
* {
&,
&:after,
&:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
@james-jlo-long
james-jlo-long / javascript resource list.md
Last active August 29, 2015 13:57
A brief list of JavaScript resources

JLo's JavaScript Resource List

Or "Everything you know about JavaScript is wrong."

Managing jQuery Validate

jQuery Validate massively simplifies form validation. It's very extensible and will handle almost every situtation in which you can find yourself. But, if you're not careful, it can become an horrific plugin on a large site.

Without thinking, the errorPlacement function can end up looking like this:

@james-jlo-long
james-jlo-long / Initial CSS resources list.md
Last active August 29, 2015 13:57
A list of handy CSS resources.

JLo's CSS Resource List

Or "Everything you know about CSS is wrong."

First thing to learn: classitis is bollocks! Giving elements multiple class names makes coding a lot easier!

Websites

Although a better description is on Smashing Magazine and Vanseo Design.