{"id":15061567,"url":"https://github.com/g-plane/malva","last_synced_at":"2025-04-13T05:08:59.398Z","repository":{"id":199609009,"uuid":"688718059","full_name":"g-plane/malva","owner":"g-plane","description":"Configurable, smart and fast CSS, SCSS, Sass and Less formatter with dprint integration.","archived":false,"fork":false,"pushed_at":"2025-03-06T00:47:59.000Z","size":963,"stargazers_count":84,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T05:07:55.726Z","etag":null,"topics":["css","dprint","dprint-plugin","formatter","formatting","less","prettier","sass","scss"],"latest_commit_sha":null,"homepage":"https://dprint.dev/plugins/malva","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g-plane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-08T00:38:23.000Z","updated_at":"2025-03-06T00:48:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b566563-a346-4e5d-96aa-5887b2318b29","html_url":"https://github.com/g-plane/malva","commit_stats":{"total_commits":373,"total_committers":2,"mean_commits":186.5,"dds":0.002680965147453085,"last_synced_commit":"4aa773bb8ba9304b03753630c788f12cdc9b373d"},"previous_names":["g-plane/malva"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fmalva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fmalva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fmalva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fmalva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g-plane","download_url":"https://codeload.github.com/g-plane/malva/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665747,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","dprint","dprint-plugin","formatter","formatting","less","prettier","sass","scss"],"created_at":"2024-09-24T23:21:38.703Z","updated_at":"2025-04-13T05:08:59.374Z","avatar_url":"https://github.com/g-plane.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e🌷 Malva\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nMalva is a configurable, smart and fast CSS, SCSS, Sass and Less formatter.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"GitHub Downloads (specific asset, latest release)\" src=\"https://img.shields.io/github/downloads/g-plane/malva/latest/plugin.wasm?style=flat-square\"\u003e\n\u003c/p\u003e\n\n## Why?\n\n### Configurable\n\nMalva is configurable. It provides several configuration options so you can\ncontrol the code style as you want.\n\nGiven the example below:\n\n```css\nbutton.disabled, button:disabled {}\n```\n\nThis selector is short enough to be put on single line,\nso Malva will put it on a single line by default,\ninstead of forcing it to be splitted into multiple lines.\n\nHowever, if you prefer putting into multiple lines, you can configure it.\n\n### Smart\n\nGiven the example below:\n\n```css\nbutton.disabled/*please use pseudo class as possible*/,button:disabled {}\n```\n\nThere're comments inside selector. Some formatters will fail to format it, but Malva will format as:\n\n```css\nbutton.disabled /*please use pseudo class as possible*/, button:disabled {}\n```\n\n[Try this on playground.](https://malva-play.vercel.app/?code=H4sIAAAAAAAAA0sqLSnJz9NLySxOTMpJTdHXKshJTSxOVSgF4oLi1NKUfIXknMTiYoXEYoWC%2FOLiTKAqLX2dJLA2K5g2hepaAIB7SA1JAAAA\u0026config=H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA%3D%3D\u0026syntax=css)\n\nAlso, thanks to the [Raffia](https://github.com/g-plane/raffia) parser,\nMalva supports cutting edge CSS syntaxes like `@container`.\n\n### Support (indented) Sass\n\nMalva supports indentation-based Sass, not just SCSS.\n\n## Quick Start\n\n### Try It Online\n\nIf you just want a quick try, you can try with the [online playground](https://malva-play.vercel.app/).\n\n### dprint\n\nWe've provided [dprint](https://dprint.dev/) integration.\n\nRun the command below to add plugin:\n\n```bash\ndprint config add g-plane/malva\n```\n\nAfter adding the dprint plugin, update your `dprint.json` and add configuration:\n\n```jsonc\n{\n  // ...\n  \"plugins\": [\n    \"https://plugins.dprint.dev/g-plane/malva-v0.11.2.wasm\"\n  ],\n  \"malva\": {\n    // Malva config comes here\n  }\n}\n```\n\nYou can also read [dprint CLI documentation](https://dprint.dev/cli/) for using dprint to format files.\n\n## Configuration\n\nPlease refer to [Configuration](https://malva.netlify.app/config/index.html).\n\n## FAQ\n\n### I don't like some of code styles. Can I propose to change it?\n\nMalva is not opinionated and is configurable,\nand we accept different code styles then switch them with configuration.\nBut before proposing a code style change, it's better to open a new issue or discussion.\n\n### My CSS code is in HTML, Vue, Svelte and Astro files. How can I format them?\n\nIf you're using dprint, you can use [markup_fmt](https://github.com/g-plane/markup_fmt)\nwhich provides a dprint plugin, then you can use these two plugins together.\n\n## Credit\n\nTests come from [Prettier](https://github.com/prettier/prettier/tree/main/tests/format).\n\n## License\n\nMIT License\n\nCopyright (c) 2023-present Pig Fang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-plane%2Fmalva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-plane%2Fmalva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-plane%2Fmalva/lists"}