diff --git a/frontend/js/commento.js b/frontend/js/commento.js index 7f01a14..020281c 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -64,6 +64,7 @@ var cdn = "[[[.CdnPrefix]]]"; var root = null; var cssOverride; + var noFonts; var autoInit; var isAuthenticated = false; var comments = []; @@ -1769,6 +1770,8 @@ if (ID_ROOT === undefined) { ID_ROOT = "commento"; } + + noFonts = attrGet(scripts[i], "data-no-fonts"); } } } @@ -1813,13 +1816,16 @@ var footer = footerLoad(); cssLoad(cdn + "/css/commento.css", "window.commento.loadCssOverride()"); + if (noFonts !== "true") { + classAdd(root, "root-font"); + } + selfGet(function() { commentsGet(function() { modToolsCreate(); rootCreate(function() { commentsRender(); append(root, footer); - attrSet(root, "style", ""); nameWidthFix(); loadHash(); global.allShow(); diff --git a/frontend/sass/commento-input.scss b/frontend/sass/commento-input.scss index d25b4cf..0a306ef 100644 --- a/frontend/sass/commento-input.scss +++ b/frontend/sass/commento-input.scss @@ -26,7 +26,6 @@ textarea::placeholder { textarea { display: inline-block; white-space: pre-wrap; - font-family: 'Source Sans Pro', sans-serif; padding: 8px; outline: none; overflow: auto; diff --git a/frontend/sass/commento.scss b/frontend/sass/commento.scss index 579e84d..21e63a0 100644 --- a/frontend/sass/commento.scss +++ b/frontend/sass/commento.scss @@ -4,13 +4,20 @@ min-height: 350px; } +.commento-root-font { + * { + font-family: 'Source Sans Pro', sans-serif !important; + } +} + .commento-root { overflow-x: hidden; padding: 0px; width: 100%; + font-family: inherit; * { - font-family: "Source Sans Pro", "Segoe UI", "Roboto", "Helvetica Neue", sans-serif; + font-family: inherit; font-size: 15px; line-height: 1.5; color: #50596c;