Skip to content

Instantly share code, notes, and snippets.

View zakmandhro's full-sized avatar

Zak Mandhro zakmandhro

  • San Francisco, CA
View GitHub Profile
@zakmandhro
zakmandhro / const_module_arrow_vs_function.ts
Last active January 17, 2022 16:45
Show the difference in methods use to namespace functions in const
const WithFunc = {
description: "Hello",
classicFunction() {
console.log(this.description, "description") // works but can lead to 'this' confusion
return "classicFunction"
}
}
const WithConst = {
description: "Hello",
@zakmandhro
zakmandhro / inline_block.scss
Created May 18, 2011 18:35
Cross-browser inline block (SASS mixin)
@mixin inline-block {
display: -moz-inline-stack; // ff 2
display: inline-block;
zoom:1; *display: inline; _height: 15px; // ie 6-7
}