Created
October 31, 2024 06:58
-
-
Save nickcheng/1ecd8bc2171753b2ce39b6dd878c6edf to your computer and use it in GitHub Desktop.
Change the fonts in Notion via Stylus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name notion-custom-fonts | |
@version 20240503.19.42 | |
@namespace https://userstyles.world/user/aquariuslt | |
@description customize your notion fonts (cjk + latin) | |
@author aquariuslt | |
@license MIT | |
==/UserStyle== */ | |
@-moz-document domain("notion.so") { | |
/* define cjk font here */ | |
@font-face { | |
font-family: 'CustomFontCJK'; | |
src: local('Noto Serif SC'); | |
unicode-range: U+4E00-9FFF; | |
} | |
@font-face { | |
font-family: 'CustomFontCJK-Bold'; | |
src: local('Noto Serif SC SemiBold'); | |
unicode-range: U+4E00-9FFF; | |
} | |
/* define latin/us font here */ | |
@font-face { | |
font-family: 'CustomFontLatin'; | |
src: local('Outfit-Thin_ExtraLight'); | |
unicode-range: U+0000-007F, U+0080-00FF; | |
} | |
/* define code/monospace font here */ | |
@font-face { | |
font-family: 'CustomFontCode'; | |
src: local('Iosevka'), local("Consolas"); | |
unicode-range: U+0000-007F, U+0080-00FF; | |
} | |
/* title in Notion */ | |
#notion-app > * h1 { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif; | |
font-weight: 600; | |
} | |
/* h1 in Notion */ | |
#notion-app > * h2 { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
color: #364e96; | |
padding: 0.5em 0; | |
border-top: solid 3px #364e96; | |
border-bottom: solid 3px #364e96; | |
} | |
/* h2 in Notion */ | |
#notion-app > * h3 { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
padding: 0.4em 0.5em; | |
color: #494949; | |
background: #f4f4f4; | |
border-left: solid 5px #7db4e6; | |
border-bottom: solid 3px #d7d7d7; | |
} | |
/* h3 in Notion */ | |
#notion-app > * h4 { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
background: linear-gradient(transparent 70%, #a7d6ff 70%); | |
} | |
/* normal text block */ | |
#notion-app > * .notion-text-block > * div.notranslate { | |
font-family: 'CustomFontCJK', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
font-weight: normal; | |
} | |
/* quote block */ | |
#notion-app > * .notion-quote-block > * div.notranslate { | |
font-family: 'CustomFontCJK', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
font-weight: normal; | |
} | |
/* code block */ | |
#notion-app > * .notion-code-block > * div.notranslate { | |
font-family: 'CustomFontCode', 'CustomFontLatin', monospaced !important; | |
} | |
/* mention */ | |
#notion-app > * .notion-text-mention-token, | |
#notion-app > * .notion-external_object_instance-block { | |
font-family: 'CustomFontCJK', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
font-weight: normal; | |
} | |
/* list-item */ | |
#notion-app > * .notion-page-block > * div.notranslate, | |
#notion-app > * .notion-collection-item > * div, | |
#notion-app > * .notion-collection_view_page-block > * div.notranslate, | |
#notion-app > * .notion-bulleted_list-block > * div.notranslate, | |
#notion-app > * .notion-numbered_list-block > * div.notranslate { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif; | |
} | |
/* page property */ | |
/* page placeholder */ | |
#notion-app > * div[aria-label="Page properties"] { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
} | |
/* template button */ | |
#notion-app > * div[role="button"] { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
} | |
/* breadcrumbs */ | |
/* sidebar */ | |
.notion-sidebar-container, | |
.notion-topbar { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
font-weight: 500; | |
} | |
/* inbox */ | |
/* search modal */ | |
.notion-scroller > div, | |
.notion-search-menu > * div { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
} | |
/* account settings modal */ | |
.notion-space-settings { | |
font-family: 'CustomFontCJK-Bold', 'CustomFontLatin', ui-sans-serif, sans-serif !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment