Browse documentation
Reference / Installation
Using the CLI
Generate CSS for a standalone HTML page with the compiler included in this repository.
Create a page
From the Mono checkout, create demo/index.html. The link points to the stylesheet you will generate beside the page.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Reading room</title>
<link rel="stylesheet" href="./mono.css">
</head>
<body>
<main class="mx-auto max-w-lg p-8">
<h1 class="font-serif text-4xl">Reading room</h1>
<p class="mt-4 leading-relaxed">A quiet place to start.</p>
</main>
</body>
</html>Build the stylesheet
Run this command with Node.js 20 or later. Open demo/index.html in your browser. The serif heading and padded column come from the generated CSS.
node ./bin/mono.mjs build --content './demo/index.html' --output './demo/mono.css' --minifyWatch while editing
Keep the terminal open while editing your page, then refresh the browser. Press Ctrl+C to stop the watcher.
node ./bin/mono.mjs build --content './demo/index.html' --output './demo/mono.css' --watch