{"id":15862120,"url":"https://github.com/afeiship/postcss-one-to-many","last_synced_at":"2026-04-28T20:04:12.641Z","repository":{"id":96088058,"uuid":"139397811","full_name":"afeiship/postcss-one-to-many","owner":"afeiship","description":"One to many for postcss.","archived":false,"fork":false,"pushed_at":"2020-01-03T08:40:21.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:55:50.538Z","etag":null,"topics":["many","margin","one","padding","postcss","to"],"latest_commit_sha":null,"homepage":null,"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/afeiship.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-02T06:03:56.000Z","updated_at":"2020-01-03T08:40:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fe18671-a1e9-40d1-8da2-5ab4b66dc6ec","html_url":"https://github.com/afeiship/postcss-one-to-many","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fpostcss-one-to-many","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fpostcss-one-to-many/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fpostcss-one-to-many/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fpostcss-one-to-many/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/postcss-one-to-many/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709935,"owners_count":20821298,"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":["many","margin","one","padding","postcss","to"],"created_at":"2024-10-05T22:25:17.350Z","updated_at":"2026-04-28T20:04:07.618Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-one-to-many\n\u003e One to many for postcss\n\n## installation\n```shell\nnpm i -D @feizheng/postcss-one-to-many\n```\n\n## usage\n+ css parts:\n```css\nbody{\n    user-select: none;\n    px:10px;\n    py:20px;\n    p: 10px;\n}\n```\n\n+ style parts:\n```js\nvar postcss = require('gulp-postcss');\nvar gulp = require('gulp');\nvar autoprefixer = require('autoprefixer');\nvar cssnano = require('cssnano');\nvar one2many = require('@feizheng/postcss-one-to-many');\n\n// styles:\ngulp.task('styles', function () {\n    var plugins = [\n      one2many(),\n      autoprefixer({ browsers: ['last 1 version'] }),\n      cssnano()\n    ];\n    return gulp.src('input.css')\n      .pipe(postcss(plugins))\n      .pipe(gulp.dest('dist'));\n});\n```\n\n## suport list:\n```js\n// margins:\nmodule.exports = {\n  'm': [\n    'margin-top',\n    'margin-right',\n    'margin-bottom',\n    'margin-left'\n  ],\n  'mx': [\n    'margin-right',\n    'margin-left'\n  ],\n  'my': [\n    'margin-top',\n    'margin-bottom'\n  ],\n  'mt': [\n    'margin-top'\n  ],\n  'mr': [\n    'margin-right'\n  ],\n  'mb': [\n    'margin-bottom'\n  ],\n  'ml': [\n    'margin-left'\n  ]\n};\n\n// paddings:\nmodule.exports = {\n  'p': [\n    'padding-top',\n    'padding-right',\n    'padding-bottom',\n    'padding-left'\n  ],\n  'px': [\n    'padding-right',\n    'padding-left'\n  ],\n  'py': [\n    'padding-top',\n    'padding-bottom'\n  ],\n  'pt': [\n    'padding-top'\n  ],\n  'pr': [\n    'padding-right'\n  ],\n  'pb': [\n    'padding-bottom'\n  ],\n  'pl': [\n    'padding-left'\n  ]\n};\n\n//radius:\nmodule.exports = {\n  'radius':[\n    'border-radius'\n  ],\n  'radius-bottom': [\n    'border-bottom-left-radius',\n    'border-bottom-right-radius'\n  ],\n  'radius-left': [\n    'border-top-left-radius',\n    'border-bottom-left-radius'\n  ],\n  'radius-right': [\n    'border-top-right-radius',\n    'border-bottom-right-radius'\n  ],\n  'radius-top': [\n    'border-top-left-radius',\n    'border-top-right-radius'\n  ]\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fpostcss-one-to-many","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fpostcss-one-to-many","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fpostcss-one-to-many/lists"}