master-co / css

The CSS Language and Framework
https://css.master.co
MIT License
1.82k stars 41 forks source link

📄 Guide for static extraction without any frameworks or build tools #365

Open Carnagion opened 4 months ago

Carnagion commented 4 months ago

What is the improvement or update you wish to see?

Currently, https://rc.css.master.co/guide/installation provides documentation for using Master CSS with various frameworks and build tools (Next.js, Svelte, Vite, etc.).

However, there is no documentation on how to use the static extraction feature without any frameworks or build tools; i.e. it is not clear how to just run Master CSS on a list of HTML files and statically extract CSS files from them.

My use case is a static website with pure HTML/CSS and no or very minimal JS - I don't need any UI frameworks or build tools for this. Something simple that lets me convert HTML files with Master CSS syntax and statically generate CSS is more than enough.

I did find an example on static extraction without using any frameworks or build tools. However, this example mentions the use of an mcss CLI tool, and there is no documentation about such a tool or how to install/use it. There is also a docs page on static extraction in general, but this is unfinished and contains practically no information.

As such, it would be nice to have some documentation on static extraction (eg. using an mcss CLI tool that generates CSS provided some HTML files) without any frameworks or build tools.

Does the docs page already exist? Please link to it.

https://rc.css.master.co/guide/rendering-modes/static-extraction

Andres6936 commented 2 months ago

Hey, see: https://stackblitz.com/edit/mastercss-hybrid-rendering?file=pages%2F_document.tsx

Reference from: https://css.master.co/docs/hybrid-rendering