Skip to content

Instantly share code, notes, and snippets.

@Ollie-w
Ollie-w / twoway.js
Created August 10, 2017 21:23
two way data binding
function bindValue(objectToBind) {
var elemToBind = document.getElementById(objectToBind.id)
elemToBind.addEventListener("change", function() {
objectToBind.value = this.value;
})
}
function proxify(id) {
var handler = {
set: function(target, key, value, receiver) {
@Ollie-w
Ollie-w / .csscomb.json
Created October 12, 2016 12:06
Alphabetize CSS with CSS Comb
{ "space-after-combinator": 1,
"space-between-declarations": "\n ",
"space-after-colon": 1,
"space-after-opening-brace": "\n",
"space-after-selector-delimiter": 1,
"always-semicolon": true,
"color-case": "lower",
"element-case": "lower",
"leading-zero": false,
"quotes": "double",