Skip to content

Instantly share code, notes, and snippets.

// Takes a string and creates a hyphenated slug
const slug = string.toLowerCase()
.replace(/[\. ,:;&()-]+/g, "-") // replace spaces and some characters with "-"
.replace(/-\s*$/, ""); // if last character is a "-", remove it
import React, { PropTypes } from "react";
import radium, { Style } from "radium";
import { color } from "../../../settings.json";
import font from "../../utils/font";
const styles = {
color: color.detailHeaderSmall,
fontFamily: font("benton"),
fontSize: "11px",
lineHeight: (17 / 11),
@thomasthesecond
thomasthesecond / design-systems-and-css-grid-8.markdown
Created February 28, 2018 07:38
Design Systems and CSS Grid, 8
[
{
"name": "New York City",
"url": "https://www.lonelyplanet.com/usa/new-york-city"
},
{
"name": "San Francisco",
"url": "https://www.lonelyplanet.com/usa/san-francisco"
},
{