{"id":16049530,"url":"https://github.com/bacoords/postcss-understrap-palette-generator","last_synced_at":"2025-10-18T17:40:08.949Z","repository":{"id":46520131,"uuid":"398096910","full_name":"bacoords/postcss-understrap-palette-generator","owner":"bacoords","description":"PostCSS plugin to generate a json file for Understrap theme","archived":false,"fork":false,"pushed_at":"2023-10-09T22:53:13.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T10:40:21.548Z","etag":null,"topics":["bootstrap","postcss","understrap","wordpress"],"latest_commit_sha":null,"homepage":"https://understrap.com","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/bacoords.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-19T23:11:53.000Z","updated_at":"2021-10-07T15:24:41.000Z","dependencies_parsed_at":"2025-03-27T22:33:09.914Z","dependency_job_id":"c2b5bb0f-cb05-436d-9484-37f8f9e65ed3","html_url":"https://github.com/bacoords/postcss-understrap-palette-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacoords%2Fpostcss-understrap-palette-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacoords%2Fpostcss-understrap-palette-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacoords%2Fpostcss-understrap-palette-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bacoords%2Fpostcss-understrap-palette-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bacoords","download_url":"https://codeload.github.com/bacoords/postcss-understrap-palette-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248269725,"owners_count":21075785,"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":["bootstrap","postcss","understrap","wordpress"],"created_at":"2024-10-09T00:24:00.646Z","updated_at":"2025-10-18T17:40:03.870Z","avatar_url":"https://github.com/bacoords.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Understrap Palette Generator\n\n[PostCSS] plugin to generate a json file of your Bootstrap color variables. This is a dependency for the [Understrap] open source WordPress theme framework. We're then digesting this JSON file to populate Gutenberg with theme colors that actually match your designs.\n\n[PostCSS]: https://github.com/postcss/postcss\n\n[Understrap]: https://github.com/understrap/understrap\n\n## Usage\n\n**Step 1:** Install plugin:\n\n```sh\nnpm install --save-dev https://github.com/bacoords/postcss-understrap-palette-generator\n```\n\n**Step 2:** Check you project for existed PostCSS config: `postcss.config.js`\nin the project root, `\"postcss\"` section in `package.json`\nor `postcss` in bundle config.\n\nIf you do not use PostCSS, add it according to [official docs]\nand set this plugin in settings.\n\n**Step 3:** Add the plugin to plugins list:\n\n```diff\nmodule.exports = {\n  plugins: [\n    autoprefixer : {}\n+   'postcss-understrap-palette-generator':{},\n  ]\n}\n```\n\n## Options\n\n### defaults: object\nPass default values for variables that may or may not be in your Bootstrap's variables. They'll get added to the JSON file with the value you set. However, if they exist in your CSS and they're in the `colors` option below, they may get overwritten by the value in your CSS. Example:\n\n```diff\nmodule.exports = {\n  plugins: [\n    autoprefixer : {}\n    'postcss-understrap-palette-generator':{\n+     defaults: {\n+       \"--magenta\": \"#ff00ff\"\n+     }\n    },\n  ]\n}\n```\n\n### colors: array\nAn array of color variables you explicitly want the tool to parse from your CSS file. The difference from `defaults` is that these are NOT added to the final output UNLESS a value is found in your CSS. Also, if you don't include a variable in this array, it does not get parsed by the tool at all.\n\n```diff\nmodule.exports = {\n  plugins: [\n    autoprefixer : {}\n    'postcss-understrap-palette-generator':{\n+     colors: [\n+       \"--primary\"\n+     ]\n    },\n  ]\n}\n```\n\n### output: string\nThe name of the JSON file you explicitly want the tool to save the parsed colors to. Defaults to `inc/editor-color-palette.json`.\n\n```diff\nmodule.exports = {\n  plugins: [\n    autoprefixer : {}\n    'postcss-understrap-palette-generator':{\n+     output: 'example/example-file.json'\n    },\n  ]\n}\n```\n\n[official docs]: https://github.com/postcss/postcss#usage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacoords%2Fpostcss-understrap-palette-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbacoords%2Fpostcss-understrap-palette-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbacoords%2Fpostcss-understrap-palette-generator/lists"}