Skip to content

Instantly share code, notes, and snippets.

@tado
Last active Jul 6, 2022
Embed
What would you like to do?
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