One CSS file, a whole new look
NoteMark reads Typora themes directly. Drop a .css file into the themes folder and headings, body text, code blocks and tables all change together; picking one re-renders the page instantly.
Theme folder
Theme files live in %LocalAppData%\NoteMark\themes\; each .css file is one theme. Use the ribbon item "Themes → Open theme folder…" to get there directly.
theme=GitHub.css.Built-in themes
Creating a theme
.css file in the theme folder. Copy any built-in theme as a starting point, or drop in an existing Typora theme.NoteMark parses the following CSS rules:
| CSS rule | Applied to |
|---|---|
body | Body font, text colour, line height |
h1 ~ h6 | Heading size, colour and weight |
blockquote | Quote border, background, text colour |
.md-fences / pre / code | Code font, size and background |
table th | Table header background |
#write | Content width (converted to table column widths) |
.hljs-* | Syntax highlighting palette (keyword / string / comment / number and so on) |
For highlighting colours you can copy a whole set of .hljs-* rules from highlight.js official styles and paste it at the end of the theme file.
:root feature variables
| Variable | Default | Description |
|---|---|---|
--enable-latex-to-image | true | Render LaTeX formulas as images (text is kept when false) |
--enable-code-line-number | false | Show line numbers in code blocks |
--mermaid-theme | default | Diagram palette: default / dark / neutral / forest |
--enable-code-border | false | Show grid lines in code blocks; borderless (default) blocks shade the full width from --code-bg, same as quote blocks |
--render-code-style | — | Legacy alias: table ≙ --enable-code-border: true, plain ≙ --enable-code-border: false (superseded by --enable-code-border, which wins when both are set) |
--code-bg / --code-fg | Follows theme CSS | Code background / text colour (overrides CSS rules) |
--quote-bg | Follows theme CSS | Quote block background |
--table-header-bg | Follows theme CSS | Table header background |
--src-bg / --src-fg | #FDFDFD / #444444 | Source view background / text colour |
--block-width-margin | — | Table column width correction (px) |
Configuration priority
:root variablesStyle variables shipped with the theme file.__global.css feature togglesGlobal overrides, which take priority over the theme.config.txt explicit overridesFor example code-line-numbers=true, the highest priority.Feature toggles (--enable-latex-to-image, --enable-code-line-number, --enable-code-border) follow __global.css: the same variable inside a theme file (such as --enable-code-line-number: false in the built-in themes) does not override the global setting.
How a theme takes effect
__global.css is merged with the selected theme's CSS and parsed by CssSheet.Parse; TyporaStyle extracts a style snapshot and StyleSet builds OneNote QuickStyleDefs that are applied to headings, quotes, code blocks and other blocks. Selecting a theme takes effect immediately (re-rendering the page); "Reload themes" rescans the folder, so CSS edits take effect the same way.