Skip to content

Instantly share code, notes, and snippets.

@tado
Last active July 6, 2022 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tado/435ab35e90f1464e2eb86475d671371c to your computer and use it in GitHub Desktop.
Save tado/435ab35e90f1464e2eb86475d671371c to your computer and use it in GitHub Desktop.
Notion CSS customize
// change font setting CSS for Windows app
function injectStylesheet(){
var styleSheet = `
.notion-collection_view_page-block .notranslate,
.notion-page-block .notranslate,
.notion-header-block .notranslate,
.notion-sub_header-block .notranslate,
.notion-sub_sub_header-block .notranslate,
.notion-app-inner
{
font-family: 'Noto Sans JP' !important;
}
.notion-code-block .notranslate {
font-family: 'Roboto Mono';
}
`;
var styleNode = document.createElement("style");
styleNode.setAttribute("type","text/css")
var content = document.createTextNode(styleSheet)
styleNode.append(content)
document.getElementsByTagName("head")[0].append(styleNode)
}
document.addEventListener('DOMContentLoaded', function () {
injectStylesheet();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment