Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| // private method | |
| // Wraps the HTML in a TAG, Tag is optional | |
| // If the html starts with a Tag, it will wrap the context in that tag. | |
| // doesn't ACTUALLY work | |
| function wrap(xhtml, tag) { | |
| // new approach | |
| // createDocumentFragment | |
| var docFrag = document.createDocumentFragment(), | |
| dummy, | |
| wrapTag; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| /* See http://mrdanadams.com/2012/pixel-ems-css-conversion-sass-mixin/ */ | |
| /* Default font size in pixels if not overridden. */ | |
| $baseFontSize: 16; | |
| /* Convert PX units to EMs. | |
| Ex: margin-right: pem(16); | |
| */ | |
| @function pem($pxval, $base: $baseFontSize) { | |
| @return #{$pxval / $base}em; |