You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Malva is a configurable, smart and fast CSS, SCSS, Sass and Less formatter.
Why?
Configurable
Malva is configurable. It provides several configuration options so you can
control the code style as you want.
Given the example below:
button.disabled,button:disabled {}
This selector is short enough to be put on single line,
so Malva will put it on a single line by default,
instead of forcing it to be splitted into multiple lines.
However, if you prefer putting into multiple lines, you can configure it.
Smart
Given the example below:
button.disabled/*please use pseudo class as possible*/,button:disabled {}
There're comments inside selector. Some formatters will fail to format it, but Malva will format as:
button.disabled/*please use pseudo class as possible*/,button:disabled {}
I don't like some of code styles. Can I propose to change it?
Malva is not opinionated and is configurable,
and we accept different code styles then switch them with configuration.
But before proposing a code style change, it's better to open a new issue or discussion.
My CSS code is in HTML, Vue, Svelte and Astro files. How can I format them?
If you're using dprint, you can use markup_fmt
which provides a dprint plugin, then you can use these two plugins together.
{ // ... "plugins": [ "https://plugins.dprint.dev/g-plane/malva-v0.15.1.wasm" ], "malva": { // Malva config comes here } }