Add Source Code Pro fallback font styles and README

This commit is contained in:
2026-07-27 18:59:12 +02:00
parent e82c0377bd
commit 4cb1bfe0fc
3 changed files with 83 additions and 23 deletions
+35 -5
View File
@@ -42,6 +42,36 @@
font-display: swap;
}
/* Public fallback for the locally licensed Berkeley Mono face. */
@font-face {
font-family: "Source Code Pro";
src: url("fonts/SourceCodePro-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Source Code Pro";
src: url("fonts/SourceCodePro-Bold.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Source Code Pro";
src: url("fonts/SourceCodePro-Italic.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: "Source Code Pro";
src: url("fonts/SourceCodePro-BoldItalic.woff2") format("woff2");
font-weight: 700;
font-style: italic;
font-display: swap;
}
/* Match the frontend's light canvas. The admin chrome is intentionally untouched. */
body.editor-styles-wrapper {
/* The canvas may be wide; theme.json constrains normal blocks to contentSize. */
@@ -169,7 +199,7 @@ body.editor-styles-wrapper {
.editor-styles-wrapper .wp-block-code .block-editor-plain-text,
.editor-styles-wrapper .wp-block-preformatted .block-editor-rich-text__editable {
/* Code blocks use editable controls rather than a rendered <code> element. */
font-family: "Berkeley Mono", monospace !important;
font-family: "Berkeley Mono", "Source Code Pro", monospace !important;
font-size: 0.8em;
}
@@ -199,7 +229,7 @@ body.editor-styles-wrapper {
.editor-styles-wrapper .wp-element-caption,
.editor-styles-wrapper .wp-caption-text {
color: #706a63;
font-family: "Berkeley Mono", monospace;
font-family: "Berkeley Mono", "Source Code Pro", monospace;
font-size: 1rem;
}
@@ -216,7 +246,7 @@ body.editor-styles-wrapper {
border-radius: 2px;
background: #c3480b;
color: #fff;
font-family: "Berkeley Mono", monospace;
font-family: "Berkeley Mono", "Source Code Pro", monospace;
font-size: 1rem;
letter-spacing: 0.04em;
}
@@ -244,7 +274,7 @@ body.editor-styles-wrapper {
}
.editor-styles-wrapper .wp-block-table th {
font-family: "Berkeley Mono", monospace;
font-family: "Berkeley Mono", "Source Code Pro", monospace;
font-size: 1em;
}
@@ -253,7 +283,7 @@ body.editor-styles-wrapper {
.editor-styles-wrapper .wp-block-quote cite,
.editor-styles-wrapper .wp-block-pullquote cite {
color: #706a63;
font-family: "Berkeley Mono", monospace !important;
font-family: "Berkeley Mono", "Source Code Pro", monospace !important;
font-size: 1rem;
font-style: normal;
}