feat: add fonts CSS with @font-face and override rules
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
53
content/styles/fonts.css
Normal file
53
content/styles/fonts.css
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/* --- @font-face declarations --- */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Reddit Sans';
|
||||||
|
src: url("../fonts/RedditSans[wght].woff2") format("woff2");
|
||||||
|
font-weight: 300 800;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Reddit Sans Condensed';
|
||||||
|
src: url("../fonts/RedditSansCondensed[wght].woff2") format("woff2");
|
||||||
|
font-weight: 300 800;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Reddit Mono';
|
||||||
|
src: url("../fonts/RedditMono[wght].woff2") format("woff2");
|
||||||
|
font-weight: 300 800;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Font overrides (gated on toggle class) --- */
|
||||||
|
html.rt-fonts-enabled,
|
||||||
|
html.rt-fonts-enabled body,
|
||||||
|
html.rt-fonts-enabled input,
|
||||||
|
html.rt-fonts-enabled textarea,
|
||||||
|
html.rt-fonts-enabled select,
|
||||||
|
html.rt-fonts-enabled button {
|
||||||
|
font-family: 'Reddit Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.rt-fonts-enabled .content,
|
||||||
|
html.rt-fonts-enabled .side,
|
||||||
|
html.rt-fonts-enabled .footer-parent,
|
||||||
|
html.rt-fonts-enabled .nav-buttons,
|
||||||
|
html.rt-fonts-enabled .tabmenu,
|
||||||
|
html.rt-fonts-enabled .morelink,
|
||||||
|
html.rt-fonts-enabled .titlebox,
|
||||||
|
html.rt-fonts-enabled .searchpane,
|
||||||
|
html.rt-fonts-enabled .infobar {
|
||||||
|
font-family: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
html.rt-fonts-enabled code,
|
||||||
|
html.rt-fonts-enabled pre,
|
||||||
|
html.rt-fonts-enabled .md code,
|
||||||
|
html.rt-fonts-enabled .md pre {
|
||||||
|
font-family: 'Reddit Mono', 'SF Mono', 'Fira Code', Consolas, monospace !important;
|
||||||
|
}
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["*://old.reddit.com/*"],
|
"matches": ["*://old.reddit.com/*", "*://www.reddit.com/*"],
|
||||||
"css": ["content/styles/badges.css", "content/styles/cards.css"],
|
"css": ["content/styles/badges.css", "content/styles/cards.css", "content/styles/fonts.css"],
|
||||||
"js": [
|
"js": [
|
||||||
"lib/settings.js",
|
"lib/settings.js",
|
||||||
"content/tweaks/badges.js",
|
"content/tweaks/badges.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user