UNPKG

typography-theme-us-web-design-standards

Version:

A theme for Typography.js inspired by the US Web Design Standaards https://standards.usa.gov/typography/

74 lines (67 loc) 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _grayPercentage = require("gray-percentage"); var _grayPercentage2 = _interopRequireDefault(_grayPercentage); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var theme = { title: "US Web Design Standards", baseFontSize: "17px", baseLineHeight: 1.53, scale: 2.35, googleFonts: [{ name: "Merriweather", styles: ["700"] }, { name: "Source Sans Pro", styles: ["400", "400i", "700"] }], headerFontFamily: ["Merriweather", "serif"], bodyFontFamily: ["Source Sans Pro", "sans-serif"], bodyColor: "hsla(0,0%,0%,0.8)", headerWeight: 700, bodyWeight: 400, boldWeight: 700, overrideStyles: function overrideStyles(_ref, options) { var adjustFontSizeTo = _ref.adjustFontSizeTo, scale = _ref.scale, rhythm = _ref.rhythm; return { h1: scale(5 / 5), h2: scale(3 / 5), h3: scale(1 / 5), h4: scale(0 / 5), h5: scale(-1 / 8), h6: _extends({}, scale(-2 / 8), { fontFamily: options.bodyFontFamily.join(","), fontWeight: options.bodyWeight, textTransform: "uppercase" }), a: { color: "#0071bc" }, "a:visited": { color: "#4c2c92" }, blockquote: _extends({}, scale(1 / 4), { borderLeft: rhythm(1 / 6) + " solid", borderColor: (0, _grayPercentage2.default)(93), paddingTop: rhythm(1 / 3), paddingBottom: rhythm(1 / 3), paddingLeft: rhythm(2 / 3), paddingRight: rhythm(2 / 3) }), "blockquote > :last-child": { marginBottom: 0 }, "blockquote cite": _extends({}, adjustFontSizeTo(options.baseFontSize), { color: (0, _grayPercentage2.default)(54, 204), fontWeight: options.bodyWeight, fontStyle: "normal" }) }; } }; exports.default = theme;