Skip to content

Commit

Permalink
feat: letter-spacing of headings more configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 11, 2024
1 parent 4454187 commit 8276b48
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
1 change: 0 additions & 1 deletion source/2-variables/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ body {

/* Optima pre-installed on macOS */
--font-heading-theme: "Optima", "Recursive S";
--heading-letter-spacing: 1.5px;

/* Use system fonts for longform */
--longform-font-text-theme: "Garamond", "Times New Roman", serif;
Expand Down
8 changes: 5 additions & 3 deletions source/3-markup/headings_inline-title.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.less-heading-letter-spacing {
--heading-letter-spacing: 0;
body {
--heading-letter-spacing: 1.5px;
}

/* ────────────────────────────────────────────────────────────────────────── */

.markdown-rendered :is(h1, h2, h3, h4, h5, h6) {
margin-top: 1em;
margin-bottom: 0.3em;
Expand All @@ -11,7 +13,7 @@ body p {
margin-block-start: 0.3em;
}

.inline-title,
.inline-title.inline-title,
.cm-header,
.markdown-rendered.markdown-rendered :is(h1, h2, h3, h4, h5, h6) {
font-weight: 700;
Expand Down
15 changes: 9 additions & 6 deletions source/style-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,15 @@ settings:
title: "Headings: No level indicators in live preview"
type: class-toggle
default: false
- id: less-heading-letter-spacing
title: "Headings: Compactness"
description: Makes headings more compact by decreasing their letter spacing.
type: class-toggle
default: false

- id: heading-letter-spacing
title: "Headings: Letter spacing"
description: Amount of space between letters.
type: variable-number-slider
default: 1.5
min: -2
max: 3
step: 0.5
format: px
#─────────────────────────────────────────────────────────────────────────────
# Colors & shapes
- id: aesthetics
Expand Down

0 comments on commit 8276b48

Please sign in to comment.