{"id":19071906,"url":"https://github.com/cyansalt/postcss-transform-decl","last_synced_at":"2026-01-04T21:51:31.276Z","repository":{"id":57328600,"uuid":"430607319","full_name":"CyanSalt/postcss-transform-decl","owner":"CyanSalt","description":"Transform any declarations with custom rules","archived":false,"fork":false,"pushed_at":"2024-05-22T03:38:46.000Z","size":700,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T00:55:26.630Z","etag":null,"topics":["postcss","postcss-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CyanSalt.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":"2021-11-22T07:38:52.000Z","updated_at":"2024-05-22T03:38:49.000Z","dependencies_parsed_at":"2023-12-07T14:28:26.569Z","dependency_job_id":"47458b66-51b4-412e-967f-d4d0d6013627","html_url":"https://github.com/CyanSalt/postcss-transform-decl","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"103d0a7a8ed170b9fc3c9adf9425d3bc3f9162b1"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Fpostcss-transform-decl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Fpostcss-transform-decl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Fpostcss-transform-decl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyanSalt%2Fpostcss-transform-decl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyanSalt","download_url":"https://codeload.github.com/CyanSalt/postcss-transform-decl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036122,"owners_count":20550661,"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":["postcss","postcss-plugin"],"created_at":"2024-11-09T01:32:23.556Z","updated_at":"2026-01-04T21:51:31.200Z","avatar_url":"https://github.com/CyanSalt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-transform-decl\n\n[![npm](https://img.shields.io/npm/v/postcss-transform-decl.svg)](https://www.npmjs.com/package/postcss-transform-decl)\n\nTransform any declarations with custom rules.\n\n## Installation\n\n```shell\nnpm install --save-dev postcss-transform-decl\n```\n\n## Usage\n\n```js\n// postcss.config.js\nmodule.exports = {\n  'postcss-transform-decl': {\n    rules: [\n      /* Your rules here ... */\n    ],\n  },\n}\n```\n\nFor legacy version:\n\n```js\n// postcss.config.js\nmodule.exports = {\n  'postcss-transform-decl/dist/legacy': {\n    rules: [\n      /* Your rules here ... */\n    ],\n  },\n}\n```\n\n## Rules\n\nYou can write rules in either of the following ways:\n\n```js\n[\n  // Exact match\n  { prop: 'overflow', from: 'overlay', to: 'hidden' },\n\n  // Regular match\n  { prop: /^overflow-?/, from: 'overlay', to: 'hidden' },\n\n  // Backward/forward compatibility\n  { prop: /^overflow-?/, from: 'overlay', to: 'hidden', at: 'before' },\n  { prop: /^overflow-?/, from: 'auto', to: 'overlay', at: 'after' },\n\n  // Regular replacement\n  { prop: /^overflow-?/, from: /^(.+)lay$/, to: '$1load' },\n  { prop: /^overflow-?/, from: /^(.+)lay$/, to: (matches, over) =\u003e `${over}load` },\n\n  // Custom functions\n  {\n    prop: /^overflow-?/,\n    transform(decl) {\n      if (decl.prop === 'overflow-x') {\n        return { from: 'overlay', to: 'auto' }\n      } else {\n        decl.value = 'hidden'\n      }\n    },\n  },\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyansalt%2Fpostcss-transform-decl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyansalt%2Fpostcss-transform-decl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyansalt%2Fpostcss-transform-decl/lists"}