Added custom fonts support (#362)

ref DES-971
This commit is contained in:
Sodbileg Gansukh 2024-11-14 19:08:13 +08:00 committed by GitHub
parent c55f9acfd2
commit 26d7651106
3 changed files with 42 additions and 47 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -154,12 +154,12 @@ hr {
line-height: 1.2;
}
.has-serif-font .gh-about-primary {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-primary {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-about-primary {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-primary {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-about-primary a {
@ -173,12 +173,12 @@ hr {
letter-spacing: -0.008em;
}
.has-serif-font .gh-about-secondary {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-secondary {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-mono-font .gh-about-secondary {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-about-secondary {
font-family: var(--gh-font-body, var(--font-mono));
}
.gh-about-primary + .gh-about-secondary {
@ -343,12 +343,12 @@ hr {
word-break: break-word;
}
.has-serif-font .gh-card-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-card-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-card-link:hover .gh-card-title {
@ -488,12 +488,12 @@ hr {
letter-spacing: -0.005em;
}
.has-serif-font.has-typographic-feed .gh-card-excerpt {
font-family: var(--font-serif);
.has-serif-font.has-typographic-feed:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-excerpt {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-mono-font.has-typographic-feed .gh-card-excerpt {
font-family: var(--font-mono);
.has-mono-font.has-typographic-feed:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-card-excerpt {
font-family: var(--gh-font-body, var(--font-mono));
}
.has-typographic-feed .gh-card-meta {
@ -651,7 +651,6 @@ hr {
.gh-article-date {
margin-top: 4px;
font-size: 1.4rem;
font-weight: 480;
color: var(--color-secondary-text);
}
@ -688,12 +687,12 @@ hr {
grid-column: 4 / span 6;
}
.has-serif-font .gh-article-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-article-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-article-excerpt {
@ -708,12 +707,12 @@ hr {
grid-column: 4 / span 6;
}
.has-serif-font .gh-article-excerpt {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-excerpt {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-mono-font .gh-article-excerpt {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-article-excerpt {
font-family: var(--gh-font-body, var(--font-mono));
}
.gh-article-excerpt .emoji {
@ -741,16 +740,12 @@ hr {
font-weight: 800;
}
.gh-content > :is(p, ul, ol) {
font-weight: 480;
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > :is([id], p, ul, ol) {
font-family: var(--gh-font-body, var(--font-serif));
}
.has-serif-font .gh-content > :is([id], p, ul, ol) {
font-family: var(--font-serif);
}
.has-mono-font .gh-content > :is([id], p, ul, ol) {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-content > :is([id], p, ul, ol) {
font-family: var(--gh-font-body, var(--font-mono));
}
.gh-article-footer {
@ -821,12 +816,12 @@ hr {
letter-spacing: -0.03em;
}
.has-serif-font .gh-cta-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-cta-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-cta-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-cta-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
.gh-cta .gh-btn {
@ -847,12 +842,12 @@ hr {
letter-spacing: -0.02em;
}
.has-serif-font .gh-navigation {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-navigation {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-navigation {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-navigation {
font-family: var(--gh-font-heading, var(--font-mono));
}
/* Comments
@ -867,12 +862,12 @@ hr {
font-weight: 800;
}
.has-serif-font .gh-comments-title {
font-family: var(--font-serif);
.has-serif-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-comments-title {
font-family: var(--gh-font-heading, var(--font-serif));
}
.has-mono-font .gh-comments-title {
font-family: var(--font-mono);
.has-mono-font:not([class*=" gh-font-heading"]):not([class^="gh-font-heading"]):not([class*=" gh-font-body"]):not([class^="gh-font-body"]) .gh-comments-title {
font-family: var(--gh-font-heading, var(--font-mono));
}
/* Subscribe