@comfit/css
v0.1.2
Published
Comfit theme stylesheets for class-based HTML
Readme
@comfit/css
Comfit theme stylesheets for class-based HTML.
Installation
npm install @comfit/cssUsage
Import the stylesheet in your bundler entry point. With an initialized @comfit/wasm highlighter that has Rust loaded, render class-based HTML:
import "@comfit/css/catppuccin-mocha.css";
const html = highlighter.renderHtml("fn main() {}", "rust", {
style: "class",
preClass: "comfit-catppuccin-mocha",
});Match preClass to the stylesheet: catppuccin-mocha.css styles code inside pre.comfit-catppuccin-mocha. Change both names to use another theme.
See HTML and CSS and Themes for stylesheets, class prefixes, bracket palettes, and line emphasis.
License
Licensed under the MIT License.
