typography-theme-kirkham
Version:
A theme for Typography.js
74 lines (65 loc) • 2.39 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: "Kirkham",
baseFontSize: "18px",
baseLineHeight: 1.44,
scaleRatio: 2.15,
blockMarginBottom: 0.75,
googleFonts: [{
name: "Playfair Display",
styles: ["700"]
}, {
name: "Fira Sans",
styles: ["400", "400i", "700", "700i"]
}],
headerFontFamily: ["Playfair Display", "serif"],
bodyFontFamily: ["Fira Sans", "sans-serif"],
headerColor: "hsla(0,0%,0%,1)",
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 _defineProperty({
a: {
color: "#9f392b"
},
blockquote: _extends({}, scale(1 / 5), {
color: (0, _grayPercentage2.default)(41),
fontStyle: "italic",
paddingLeft: rhythm(13 / 16),
marginLeft: 0,
borderLeft: rhythm(3 / 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: '"— "'
}
}, _typographyBreakpointConstants.MOBILE_MEDIA_QUERY, {
blockquote: {
marginLeft: rhythm(-3 / 4),
marginRight: 0,
paddingLeft: rhythm(9 / 16)
}
});
}
};
exports.default = theme;