mathpix-markdown-it
Version:
Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)
10 lines • 4.55 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.codeStyles = void 0;
var colors_1 = require("./colors");
var codeStyles = function (useColors) {
if (useColors === void 0) { useColors = true; }
return "\n#preview-content code, #setText code {\n font-family: Inconsolata;\n font-size: inherit;\n display: initial;\n ".concat(useColors ? "background: ".concat(colors_1.COLOR_CODE_BG, ";") : '', "\n}\n#preview-content .mmd-highlight code, #setText .mmd-highlight code,\n#preview-content pre.mmd-highlight code, #setText pre.mmd-highlight code {\n background-color: transparent;\n}\n#preview-content pre code, #setText pre code {\n font-family: 'DM Mono', Inconsolata, monospace;\n ").concat(useColors ? "color: ".concat(colors_1.COLOR_PRE_CODE_TEXT, ";") : '', "\n font-size: 15px;\n}\n.hljs-comment, .hljs-quote,\n#preview-content .hljs-comment, #setText .hljs-comment,\n#preview-content .hljs-quote, #setText .hljs-quote {\n color: ").concat(colors_1.HLJS_COMMENT, ";\n font-style: italic;\n}\n.hljs-command,\n#preview-content .hljs-command, #setText .hljs-command {\n color: ").concat(colors_1.HLJS_COMMAND, ";\n}\n.hljs-keyword, .hljs-selector-tag, .hljs-subst,\n#preview-content .hljs-keyword, #setText .hljs-keyword,\n#preview-content .hljs-selector-tag, #setText .hljs-selector-tag,\n#preview-content .hljs-subst, #setText .hljs-subst {\n color: ").concat(colors_1.HLJS_KEYWORD, ";\n font-weight: bold;\n}\n.hljs-number, .hljs-literal, .hljs-variable,\n.hljs-template-variable, .hljs-tag .hljs-attr,\n#preview-content .hljs-number, #setText .hljs-number,\n#preview-content .hljs-literal, #setText .hljs-literal,\n#preview-content .hljs-variable, #setText .hljs-variable,\n#preview-content .hljs-template-variable, #setText .hljs-template-variable,\n#preview-content .hljs-tag .hljs-attr, #setText .hljs-tag .hljs-attr {\n color: ").concat(colors_1.HLJS_COMMAND, ";\n}\n.hljs-string, .hljs-doctag,\n#preview-content .hljs-string, #setText .hljs-string,\n#preview-content .hljs-doctag, #setText .hljs-doctag {\n color: ").concat(colors_1.HLJS_STRING, ";\n}\n.hljs-title, .hljs-section, .hljs-selector-id,\n#preview-content .hljs-title, #setText .hljs-title,\n#preview-content .hljs-section, #setText .hljs-section,\n#preview-content .hljs-selector-id, #setText .hljs-selector-id {\n color: ").concat(colors_1.HLJS_TITLE, ";\n font-weight: bold;\n}\n.hljs-subst,\n#preview-content .hljs-subst, #setText .hljs-subst {\n font-weight: normal;\n}\n.hljs-type, .hljs-class .hljs-title,\n#preview-content .hljs-type, #setText .hljs-type,\n#preview-content .hljs-class .hljs-title, #setText .hljs-class .hljs-title {\n color: ").concat(colors_1.HLJS_TYPE, ";\n font-weight: bold;\n}\n.hljs-tag, .hljs-name, .hljs-attribute,\n#preview-content .hljs-tag, #setText .hljs-tag,\n#preview-content .hljs-name, #setText .hljs-name,\n#preview-content .hljs-attribute, #setText .hljs-attribute {\n color: ").concat(colors_1.HLJS_TAG, ";\n font-weight: normal;\n}\n.hljs-regexp, .hljs-link,\n#preview-content .hljs-regexp, #setText .hljs-regexp,\n#preview-content .hljs-link, #setText .hljs-link {\n color: ").concat(colors_1.HLJS_REGEXP, ";\n}\n.hljs-symbol, .hljs-bullet,\n#preview-content .hljs-symbol, #setText .hljs-symbol,\n#preview-content .hljs-bullet, #setText .hljs-bullet {\n color: ").concat(colors_1.HLJS_SYMBOL, ";\n}\n.hljs-built_in, .hljs-builtin-name,\n#preview-content .hljs-built_in, #setText .hljs-built_in,\n#preview-content .hljs-builtin-name, #setText .hljs-builtin-name {\n color: ").concat(colors_1.HLJS_STRING, ";\n}\n.hljs-meta,\n#preview-content .hljs-meta, #setText .hljs-meta {\n color: ").concat(colors_1.HLJS_META, ";\n font-weight: bold;\n}\n.hljs-meta-keyword,\n#preview-content .hljs-meta-keyword, #setText .hljs-meta-keyword {\n color: ").concat(colors_1.HLJS_KEYWORD, ";\n}\n.hljs-meta-string,\n#preview-content .hljs-meta-string, #setText .hljs-meta-string {\n color: ").concat(colors_1.HLJS_META_STRING, ";\n}\n.hljs-deletion,\n#preview-content .hljs-deletion, #setText .hljs-deletion {\n background: ").concat(colors_1.HLJS_DELETION_BG, ";\n}\n.hljs-addition,\n#preview-content .hljs-addition, #setText .hljs-addition {\n background: ").concat(colors_1.HLJS_ADDITION_BG, ";\n}\n.hljs-emphasis,\n#preview-content .hljs-emphasis, #setText .hljs-emphasis {\n font-style: italic;\n}\n.hljs-strong,\n#preview-content .hljs-strong, #setText .hljs-strong {\n font-weight: bold;\n}\n");
};
exports.codeStyles = codeStyles;
//# sourceMappingURL=styles-code.js.map