Skip to content

Instantly share code, notes, and snippets.

View yuanqing's full-sized avatar

Yuan Qing Lim yuanqing

View GitHub Profile
@yuanqing
yuanqing / README.md
Last active September 14, 2015 16:32 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@yuanqing
yuanqing / gist:8736cef5ca9c613f6eac
Last active September 14, 2015 16:30 — forked from fat/gist:3744369
all you probably really need
/*! normalize-all-you-really-need-tho.css v1.0.0 | MIT License */
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
body {
margin: 0;
@yuanqing
yuanqing / loadscript.js
Last active September 13, 2015 03:42 — forked from esamattis/loadscript.js
/**
* Simple node.js style script loader for modern browsers
**/
function loadScript(src, cb) {
var script = document.createElement('script');
script.async = true;
script.src = src;
script.onerror = function() {
cb(new Error("Failed to load" + src));