2024-06-28 09:03:28 -07:00
|
|
|
{{/*
|
|
|
|
typography.css
|
|
|
|
Eryn Wells <eryn@erynwells.me>
|
|
|
|
vim: set sw=2 sts=2:
|
|
|
|
*/}}
|
|
|
|
|
|
|
|
{{- $base := (index . "Base") | default 1 -}}
|
|
|
|
{{- $unit := (index . "Unit") | default "rem" -}}
|
|
|
|
{{- $factor := (index . "Factor") | default 1.200 -}}
|
2024-06-29 10:29:49 -07:00
|
|
|
{{- $scale := partial "base/_size_scale.html" . }}
|
2024-06-28 09:03:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********
|
|
|
|
# FONTS
|
|
|
|
********/
|
|
|
|
|
|
|
|
@import url("https://use.typekit.net/fji8aoy.css");
|
|
|
|
|
2024-07-03 07:42:22 -07:00
|
|
|
{{ with resources.Get "fonts/merriweather.woff2" -}}
|
|
|
|
@font-face {
|
|
|
|
font-family: "merriweather";
|
|
|
|
src: url("{{ .Permalink }}");
|
|
|
|
}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ with resources.Get "fonts/merriweather-italic.woff2" -}}
|
|
|
|
@font-face {
|
|
|
|
font-family: "merriweather";
|
|
|
|
font-style: italic;
|
|
|
|
src: url("{{ .Permalink }}");
|
|
|
|
}
|
|
|
|
{{- end }}
|
|
|
|
|
2024-06-28 09:03:28 -07:00
|
|
|
:root {
|
|
|
|
/* --font-family-heading: "rockwell", serif; */
|
2024-07-06 10:21:54 -07:00
|
|
|
--font-family-sans: system-ui, Arial, sans-serif;
|
|
|
|
--font-family-serif: "merriweather", Georgia, serif;
|
2024-06-28 09:03:28 -07:00
|
|
|
--font-family-monospace: "source-code-pro", monospace;
|
|
|
|
|
2024-07-06 10:21:54 -07:00
|
|
|
--font-family-body: var(--font-family-sans);
|
|
|
|
--font-family-heading: var(--font-family-serif);
|
|
|
|
|
2024-06-28 09:03:28 -07:00
|
|
|
--text-base-size: 125%;
|
|
|
|
--text-base: {{ $base }}{{ $unit }};
|
2024-07-03 07:42:57 -07:00
|
|
|
{{ range $scale -}}
|
|
|
|
--text-{{ .Name }}: calc(var(--text-base) * pow({{ $factor }}, {{ .Value }}));
|
|
|
|
{{- end }}
|
2024-06-28 09:03:28 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Font size utility classes */
|
|
|
|
{{ range $scale }}
|
|
|
|
.text--{{ .Name }} { font-size: var(--text-{{ .Name }}); }
|
|
|
|
{{- end }}
|
2024-07-06 10:21:54 -07:00
|
|
|
.text--mono { font-family: var(--font-family-monospace); }
|
|
|
|
.text--serif { font-family: var(--font-family-serif); }
|
|
|
|
.text--sans { font-family: var(--font-family-sans); }
|
2024-06-28 09:03:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
html {
|
|
|
|
font-family: var(--font-family-body);
|
|
|
|
font-size: var(--text-base-size);
|
|
|
|
line-height: 1.45;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********
|
|
|
|
## HEADINGS
|
|
|
|
***********/
|
|
|
|
|
|
|
|
h1, h2, h3, h4, h5, h6 {
|
|
|
|
font-family: var(--font-family-heading);
|
|
|
|
}
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
font-size: var(--text-xxl);
|
|
|
|
letter-spacing: 0.05em;
|
|
|
|
}
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
font-size: var(--text-xl);
|
|
|
|
letter-spacing: 0.03em;
|
|
|
|
}
|
|
|
|
|
|
|
|
h3 {
|
|
|
|
font-size: var(--text-l);
|
|
|
|
}
|
|
|
|
|
|
|
|
h4 {
|
|
|
|
font-size: var(--text-m);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
header {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
p {
|
|
|
|
letter-spacing: 0.01em;
|
|
|
|
}
|
|
|
|
|
|
|
|
p, pre {
|
|
|
|
font-size: var(--text-m);
|
|
|
|
}
|
|
|
|
|
|
|
|
sup {
|
|
|
|
font-size: 60%;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-size: var(--text-xxl);
|
|
|
|
letter-spacing: 0.05em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.subtitle {
|
|
|
|
font-weight: lighter;
|
|
|
|
}
|
2024-07-06 10:21:54 -07:00
|
|
|
|
|
|
|
figcaption,
|
|
|
|
small,
|
|
|
|
.text--small
|
|
|
|
{
|
|
|
|
color: var(--gray4);
|
|
|
|
font-weight: normal;
|
|
|
|
font-size: var(--text-s);
|
|
|
|
letter-spacing: 0.01em;
|
|
|
|
}
|