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
Current section
Files
priv/themes/default.css
/*
* MF2 editor theme: Default Style
*
* Generated by `scripts/generate_themes.exs` from Makeup's
* `default` 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/default.css" />
*
* Server-rendered HTML (standalone):
* {:ok, html} = Localize.Message.to_html(msg, standalone: true)
*/
.mf2-highlight {
background-color: #f8f8f8;
color: inherit;
padding: 0.75em 1em;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
overflow-x: auto;
}
.mf2-variable, .mf2-variable-builtin {
color: #19177C;
}
.mf2-function {
color: #0000FF;
}
.mf2-keyword, .mf2-keyword-import {
color: #008000;
}
.mf2-tag, .mf2-keyword-conditional {
color: #008000;
font-weight: bold;
}
.mf2-attribute, .mf2-punctuation-special {
color: #7D9029;
}
.mf2-property {
color: #A0A000;
}
.mf2-number {
color: #666666;
}
.mf2-string-escape {
color: #BB6622;
font-weight: bold;
}
.mf2-string {
color: #BA2121;
}
.mf2-constant-builtin {
color: #008000;
font-weight: bold;
}
.mf2-punctuation-bracket, .mf2-operator {
color: #666666;
}