{"id":24983704,"url":"https://github.com/posthtml/posthtml-atomizer","last_synced_at":"2025-06-12T08:33:32.282Z","repository":{"id":37754064,"uuid":"126105396","full_name":"posthtml/posthtml-atomizer","owner":"posthtml","description":"Generate Atomic CSS with Atomizer via PostHTML","archived":false,"fork":false,"pushed_at":"2022-12-09T08:25:21.000Z","size":1093,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T21:06:03.735Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/posthtml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-21T01:29:00.000Z","updated_at":"2021-09-21T09:43:06.000Z","dependencies_parsed_at":"2023-01-25T19:31:36.415Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-atomizer","commit_stats":null,"previous_names":["charlesbjohnson/posthtml-atomizer"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-atomizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-atomizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-atomizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-atomizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-atomizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467620,"owners_count":20620215,"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":[],"created_at":"2025-02-04T09:20:33.505Z","updated_at":"2025-03-29T10:12:44.080Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"# posthtml-atomizer\n\n[![npm][npm-img]][npm-url]\n[![travis][travis-img]][travis-url]\n[![codecov][codecov-img]][codecov-url]\n[![deps][deps-img]][deps-url]\n[![license][license-img]][license-url]\n\nA [PostHTML][posthtml-url] plugin to generate Atomic CSS definitions using [Atomizer][atomizer-url].\n\n## Contents\n\n- [Install](#install)\n- [Options](#options)\n- [License](#license)\n\n## Install\n\n1. Ensure that `posthtml` is installed already.\n2. Install the plugin:\n\n    ```sh\n    $ npm install --save-dev posthtml-atomizer\n    ```\n\n3. Configure the plugin:\n\n    ```js\n    const posthtml = require('posthtml');\n\n    // ...\n\n    posthtml([\n      require('posthtml-atomizer')({ path: './atomic.css' })\n    ])\n\n    // ...\n    ```\n\n4. Use [Atomizer's Atomic CSS classes][atomizer-ref] in your HTML:\n\n    ```html\n    // in index.html\n\n    \u003chtml\u003e\n      \u003cbody\u003e\n        \u003cdiv class=\"D(b) Va(t) Fz(20px)\"\u003eHello World!\u003c/div\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n    ```\n\n5. Generate Atomic CSS definitions as a result:\n\n    ```\n    // in generated atomic.css\n\n    .D(b) {\n        display: block;\n    }\n    .Va(t) {\n        vertical-align: top;\n    }\n    .Fz(20px) {\n        font-size: 20px;\n    }\n    ```\n\n## Options\n\nThe options schema is the following:\n\n- An object with the following optional keys:\n    - `atomizer` - an object with the following optional keys:\n        - `config` - the Atomizer configuration object used when generating CSS.\n        - `options` - the Atomizer options object used when generating CSS\n    - `path` - a string file path where the generated CSS is written.\n\n### `atomizer`\n\nThese options are used to configure Atomizer itself.\n\n### `atomizer.config`\n\n- Default: `{}`\n\nThis option is used for configuring options such as `breakpoints`, `custom` suffixes, default `classNames`, etc.\n\n### `atomizer.options`\n\n- Default: `{}`\n\nThis option is used for configuring options such as `rtl`, `namespace`, `ie`, etc.\n\n### `path`\n\n- Default: `'./atomic.css'`\n\nThis option is used to configure where the plugin will write the CSS Atomizer generates.\n\n**NOTE**: If Atomizer does not generate any CSS, a blank file will still be created.\n\n**NOTE**: If a file already exists at this location then it will be overwritten.\n\n## License\n\n[MIT][license-url]\n\n[npm-img]: https://img.shields.io/npm/v/posthtml-atomizer.svg\n[npm-url]: https://npmjs.com/package/posthtml-atomizer\n\n[travis-img]: https://img.shields.io/travis/charlesbjohnson/posthtml-atomizer.svg\n[travis-url]: https://travis-ci.org/charlesbjohnson/posthtml-atomizer\n\n[codecov-img]: https://img.shields.io/codecov/c/github/charlesbjohnson/posthtml-atomizer.svg\n[codecov-url]: https://codecov.io/github/charlesbjohnson/posthtml-atomizer?branch=master\n\n[deps-img]: https://david-dm.org/charlesbjohnson/posthtml-atomizer.svg\n[deps-url]: https://david-dm.org/charlesbjohnson/posthtml-atomizer\n\n[license-img]: https://img.shields.io/github/license/charlesbjohnson/posthtml-atomizer.svg\n[license-url]: ./LICENSE\n\n[posthtml-url]: https://github.com/posthtml/posthtml\n\n[atomizer-url]: https://github.com/acss-io/atomizer\n[atomizer-ref]: https://acss.io/reference\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-atomizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-atomizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-atomizer/lists"}