Packages

Browser-side MF2 syntax highlighter + Phoenix LiveView hook. Ships a prebuilt web-tree-sitter bundle and the tree-sitter-mf2 grammar compiled to WASM. Consumers drop a script tag and a textarea-over-pre widget — no per-keystroke server round trip.

Current section

Files

Jump to
mf2_wasm_editor priv themes paraiso_dark.css
Raw

priv/themes/paraiso_dark.css

/*
* MF2 editor theme: ParaisoDark Style
*
* Generated by `scripts/generate_themes.exs` from Makeup's
* `paraiso_dark` Pygments theme (pinned to v1.1.0).
* Classes use the tree-sitter capture taxonomy, so this
* stylesheet styles both the browser editor and the HTML
* emitted by `Localize.Message.to_html/2`.
*
* Editor:
* <link rel="stylesheet" href="/mf2_editor/themes/paraiso_dark.css" />
*
* Server-rendered HTML (standalone):
* {:ok, html} = Localize.Message.to_html(msg, standalone: true)
*/
.mf2-highlight {
background-color: #2f1e2e;
color: #e7e9db;
padding: 0.75em 1em;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
overflow-x: auto;
}
.mf2-highlight code {
color: #e7e9db;
}
.mf2-variable, .mf2-variable-builtin {
color: #ef6155;
}
.mf2-function {
color: #06b6ef;
}
.mf2-keyword, .mf2-keyword-import {
color: #5bc4bf;
}
.mf2-tag, .mf2-keyword-conditional {
color: #5bc4bf;
}
.mf2-attribute, .mf2-punctuation-special {
color: #06b6ef;
}
.mf2-property {
color: #06b6ef;
}
.mf2-number {
color: #f99b15;
}
.mf2-string-escape {
color: #f99b15;
}
.mf2-string {
color: #48b685;
}
.mf2-constant-builtin {
color: #815ba4;
}
.mf2-punctuation-bracket, .mf2-operator {
color: #e7e9db;
}