The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| /* | |
| Margin & Padding spacers | |
| usage: mt-4 -> margin-top: 4rem; | |
| */ | |
| $spacer: 1rem; | |
| $sizes: 0, 1, 2, 3, 4, 5, 6; | |
| $directions: top, left, bottom, right; | |
| @each $direction in $directions{ | |
| @each $size in $sizes{ | 
| import 'isomorphic-fetch'; | |
| import gql from 'graphql-tag'; | |
| import { ApolloClient } from 'apollo-client'; | |
| import { InMemoryCache } from 'apollo-cache-inmemory'; | |
| import { HttpLink } from 'apollo-link-http'; | |
| import url from 'url'; | |
| import { normalizeRequest } from './sms-middleware.util'; | |
| import log from '../../../common/log'; | |
| /** | 
| const spacingFactor = 8; | |
| export const spacing = { | |
| space0: `${computeGoldenRatio(spacingFactor, 0)}px`, // 8 | |
| space1: `${computeGoldenRatio(spacingFactor, 1)}px`, // 13 | |
| space2: `${computeGoldenRatio(spacingFactor, 2)}px`, // 21 | |
| space3: `${computeGoldenRatio(spacingFactor, 3)}px`, // 34 | |
| space4: `${computeGoldenRatio(spacingFactor, 4)}px`, // 55 | |
| space5: `${computeGoldenRatio(spacingFactor, 5)}px`, // 89 | |
| }; | 
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {float} a random floating point number | |
| */ | |
| function getRandom(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } | 
| function getSupportedPropertyName(properties) { | |
| for (var i = 0; i < properties.length; i++) { | |
| if (typeof document.body.style[properties[i]] != "undefined") { | |
| return properties[i]; | |
| } | |
| } | |
| return null; | |
| } | |
| src | |
| .idea/ | |
| node_modules | 
| # Logs | |
| logs | |
| *.log | |
| npm-debug.log* | |
| # compiled js | |
| dist | |
| # Dependency directories | |
| node_modules | 
| { | |
| "presets": [ | |
| "stage-2", | |
| "es2015" | |
| ], | |
| "plugins": [ | |
| "transform-flow-strip-types", | |
| "transform-object-assign", | |
| "transform-class-properties", | |
| "transform-runtime" | 
| [libs] | |
| [ignore] | |
| [options] |