View postcss.js
/* CSSNode
/* ========================================================================== */
function CSSNode(source) {
this.source = source;
}
Object.defineProperties(CSSNode.prototype, {
index: {
get() {
View README.md
View sanitizeDOM.js
// sanitize an element using a whitelisted selector string
function sanitizeDOM(ELEMENT, WHITELISTED_SELECTORS, WHITELISTED_ATTRIBUTES) {
// get all elements within an ELEMENT
Array.prototype.forEach.call(ELEMENT.querySelectorAll('*'), node => {
// if the element does not match a WHITELIST_SELECTOR_STRING
if (!node.matches(WHITELISTED_SELECTORS)) {
// create a new document fragment
const fragment = document.createDocumentFragment();
// append all the children of the invalid node into the new fragment
View harlem-shake.js
javascript: (function () {
function c() {
var e = document.createElement("link");
e.setAttribute("type", "text/css");
e.setAttribute("rel", "stylesheet");
e.setAttribute("href", f);
e.setAttribute("class", l);
document.body.appendChild(e)
}
function h() {
View scrollr.js
(function (win, doc) {
//
var
_defined = function(valA, valB) {
return valA != undefined ? valA : valB;
};
hasTouch = 'ontouchstart' in win;
startEvent = hasTouch ? 'touchstart' : 'mousedown',
moveEvent = hasTouch ? 'touchmove' : 'mousemove',
endEvent = hasTouch ? 'touchend' : 'mouseup',
View README.md

Calcite Font Sizes

Font Class Natural Medium Narrow
font-size--3 13.8125px - -
font-size--2 14.875px - -
font-size--1 15.9375px - -
font-size-0 17px - -
font-size-1 20.4323px 19.2185px 18.0625px
font-size-2 24.038px 22.61px 21.25px
View README.md

Install Brew and Brew Cask:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
View README.sh
ssh-add -K ~/.ssh/id_rsa
View README.sh
sudo find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
View challenge.css
h { font-size: 2em; }
:matches(article, aside, nav, section) h { font-size: 1.5em; }
:matches(article, aside, nav, section) :matches(article, aside, nav, section) h { font-size: 1.17em; }
:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h { font-size: 1em; }
:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h { font-size: .83em; }