typography-theme-moraga
Version:
A theme for Typography.js
81 lines (67 loc) • 2.56 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");
var _compassVerticalRhythm = require("compass-vertical-rhythm");
var _compassVerticalRhythm2 = _interopRequireDefault(_compassVerticalRhythm);
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: "Moraga",
baseFontSize: "18px",
baseLineHeight: 1.56,
googleFonts: [{
name: "Source Sans Pro",
styles: ["200", "400", "400i", "700"]
}],
scaleRatio: 2.5,
headerFontFamily: ["Source Sans Pro", "sans-serif"],
bodyFontFamily: ["Source Sans Pro", "sans-serif"],
headerColor: "hsla(0,0%,0%,0.85)",
bodyColor: "hsla(0,0%,0%,0.7)",
headerWeight: "200",
bodyWeight: 400,
boldWeight: 700,
overrideStyles: function overrideStyles(_ref, options) {
var scale = _ref.scale,
rhythm = _ref.rhythm;
var vr = (0, _compassVerticalRhythm2.default)({
baseFontSize: "16px",
baseLineHeight: "24.88px"
});
var styles = _defineProperty({
"h1 a,h2 a,h3 a,h4 a,h5 a,h6 a": {
fontWeight: options.headerWeight
},
a: {
fontWeight: 400,
color: "#419eda",
textDecoration: "none"
},
"a:hover": {
color: "#2a6496",
textDecoration: "underline"
},
blockquote: _extends({}, scale(1 / 5), {
color: (0, _grayPercentage2.default)(40),
paddingLeft: rhythm(3 / 4),
marginLeft: 0,
borderLeft: rhythm(1 / 4) + " solid " + (0, _grayPercentage2.default)(87)
})
}, _typographyBreakpointConstants.TABLET_MEDIA_QUERY, {
html: _extends({}, vr.establishBaseline()),
blockquote: {
marginLeft: rhythm(-3 / 4),
marginRight: 0,
paddingLeft: rhythm(1 / 2)
},
table: _extends({}, scale(-1 / 5))
});
return styles;
}
};
exports.default = theme;