mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 19:17:03 +00:00
feat(fonts): apply per-book body and heading fonts on screen
Split heading typography onto a new --font-heading token and set both --font-book and --font-heading from the active book's fonts when it opens or its setup changes. Declare @font-face for the new bundled fonts.
This commit is contained in:
1 parent
124c1947c1
commit
28367b6670
5 files changed
+101
-6
No files matched your search
+14
-5
@@ -427,6 +427,7 @@ body.resizing {
|
||||
}
|
||||
|
||||
.chapter-title {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 500;
|
||||
font-size: 31px;
|
||||
line-height: 1.16;
|
||||
@@ -434,6 +435,10 @@ body.resizing {
|
||||
margin: 15px 0 0;
|
||||
}
|
||||
|
||||
.prose :is(h1, h2, h3) {
|
||||
font-family: var(--font-heading);
|
||||
}
|
||||
|
||||
.prose p {
|
||||
font-size: 19px;
|
||||
line-height: 1.68;
|
||||
@@ -565,11 +570,15 @@ body.resizing {
|
||||
}
|
||||
|
||||
.page .p-title {
|
||||
font-family: var(--font-book);
|
||||
font-family: var(--font-heading);
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.page :is(h2, h3) {
|
||||
font-family: var(--font-heading);
|
||||
}
|
||||
|
||||
.page p {
|
||||
font-family: var(--font-book);
|
||||
font-size: 6.6px;
|
||||
@@ -620,7 +629,7 @@ body.resizing {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
font-family: var(--font-book);
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 500;
|
||||
font-size: 31px;
|
||||
line-height: 1.16;
|
||||
@@ -1432,7 +1441,7 @@ body.resizing {
|
||||
}
|
||||
|
||||
.cover-title {
|
||||
font-family: var(--font-book);
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 500;
|
||||
font-size: 9.5cqw;
|
||||
line-height: 1.08;
|
||||
@@ -2108,7 +2117,7 @@ body.resizing {
|
||||
}
|
||||
|
||||
.device-title {
|
||||
font-family: var(--font-book);
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 500;
|
||||
font-size: calc(24 * var(--dv-scale));
|
||||
line-height: 1.2;
|
||||
@@ -2138,7 +2147,7 @@ body.resizing {
|
||||
.device-body h1,
|
||||
.device-body h2,
|
||||
.device-body h3 {
|
||||
font-family: var(--font-book);
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
margin: 1.2em 0 0.5em;
|
||||
|
||||
Reference in new issue
Block a user