{"id":22034845,"url":"https://github.com/jaid/postcss-value-replace","last_synced_at":"2025-05-07T19:00:22.028Z","repository":{"id":24174430,"uuid":"100803114","full_name":"Jaid/postcss-value-replace","owner":"Jaid","description":"PostCSS plugin that replaces any value specified in options.","archived":false,"fork":false,"pushed_at":"2022-12-08T16:38:09.000Z","size":2257,"stargazers_count":3,"open_issues_count":18,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T23:48:12.474Z","etag":null,"topics":["css","extension","plugin","postcss","postcss-plugin","preprocessor","style","sugar","transpile"],"latest_commit_sha":null,"homepage":"https://github.com/Jaid/postcss-value-replace","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/Jaid.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-19T15:25:39.000Z","updated_at":"2020-10-30T02:09:22.000Z","dependencies_parsed_at":"2023-01-14T00:32:05.565Z","dependency_job_id":null,"html_url":"https://github.com/Jaid/postcss-value-replace","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fpostcss-value-replace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fpostcss-value-replace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fpostcss-value-replace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaid%2Fpostcss-value-replace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaid","download_url":"https://codeload.github.com/Jaid/postcss-value-replace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252940883,"owners_count":21828766,"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","extension","plugin","postcss","postcss-plugin","preprocessor","style","sugar","transpile"],"created_at":"2024-11-30T10:14:00.739Z","updated_at":"2025-05-07T19:00:21.309Z","avatar_url":"https://github.com/Jaid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-value-replace\n\n[PostCSS](https://github.com/postcss/postcss) plugin that replaces values specified in options. This is an easy way to create flexible themes.\n\n## Example\n\nInput\n```css\na {\n    color: replace(linkColor);\n    background: rgba(replace(\"red\"), replace(\"green\"), replace(\"blue\"), replace(alpha));\n    margin: replace(\"margin\");\n    font-weight: replace(font-weight);\n}\n```\nOptions\n```js\npostcss([require(\"postcss-value-replace\")({\n    replace: {\n         linkColor: \"#00CC00\",\n         red: 200,\n         green: 60,\n         blue: 80,\n         alpha: 0.5,\n         margin: \"5px 2px 5px 2px\",\n         \"font-weight\": \"bold\"\n    }\n})])\n```\nOutput\n```css\na {\n    color: #00CC00;\n    background: rgba(200, 60, 80, 0.5);\n    margin: 5px 2px 5px 2px;\n    font-weight: bold;\n}\n```\n\n## Options\n\n - `functionName = \"replace\"` Name of the CSS function postcss-value-replace looks for\n - `replace = {}` Object where keys are the first argument of the CSS replace() function and values the corresponding replacement value\n\nAdd key-value-pairs to `replace` to make this plugin replace values in your CSS.\n\n## Plugin order\n\nThis should be the first plugin in your plugins array.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fpostcss-value-replace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaid%2Fpostcss-value-replace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaid%2Fpostcss-value-replace/lists"}