typography-theme-stern-grove
Version:
A theme for Typography.js
90 lines (80 loc) • 2.86 kB
JavaScript
"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);
var _typographyBreakpointConstants = require("typography-breakpoint-constants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var theme = {
title: "Stern Grove",
baseFontSize: "18px",
baseLineHeight: 5 / 3,
googleFonts: [{
name: "Montserrat",
styles: ["400"]
}],
headerFontFamily: ["Montserrat", "sans-serif"],
bodyFontFamily: ["Georgia", "Cambria", "serif"],
headerColor: "hsla(0,0%,0%,0.5)",
bodyColor: "hsla(0,0%,0%,0.87)",
headerWeight: 400,
bodyWeight: 400,
boldWeight: 700,
overrideStyles: function overrideStyles(_ref, options) {
var _ref2;
var adjustFontSizeTo = _ref.adjustFontSizeTo,
scale = _ref.scale,
rhythm = _ref.rhythm;
return _ref2 = {
a: {
color: "#07e",
textDecoration: "none"
},
"a:hover,a:active": {
color: "#e32"
},
blockquote: _extends({}, scale(1 / 5), {
background: (0, _grayPercentage2.default)(97),
color: (0, _grayPercentage2.default)(31),
paddingLeft: rhythm(14 / 16),
paddingRight: rhythm(1 / 2),
paddingTop: rhythm(1 / 2),
paddingBottom: rhythm(1 / 2),
marginLeft: 0,
marginRight: 0,
borderLeft: rhythm(2 / 16) + " solid " + (0, _grayPercentage2.default)(80)
}),
"blockquote > :last-child": {
marginBottom: 0
},
"blockquote cite": _extends({}, adjustFontSizeTo(options.baseFontSize), {
color: options.bodyColor,
fontWeight: options.bodyWeight
}),
"blockquote cite:before": {
content: '"— "'
},
ul: {
listStyle: "disc"
}
}, _defineProperty(_ref2, _typographyBreakpointConstants.MOBILE_MEDIA_QUERY, {
"ul,ol": {
marginLeft: rhythm(1)
},
blockquote: {
marginLeft: rhythm(-3 / 4),
marginRight: rhythm(-3 / 4),
paddingLeft: rhythm(11 / 16),
paddingRight: rhythm(3 / 4)
}
}), _defineProperty(_ref2, "h1,h2,h3,h4,h5,h6", {
marginTop: rhythm(2)
}), _defineProperty(_ref2, "h6", {
fontStyle: "italic"
}), _ref2;
}
};
exports.default = theme;