{"id":14968111,"url":"https://github.com/postcss/postcss-size","last_synced_at":"2025-10-19T09:31:53.560Z","repository":{"id":26878951,"uuid":"30339567","full_name":"postcss/postcss-size","owner":"postcss","description":"PostCSS plugin for size shortcut","archived":false,"fork":false,"pushed_at":"2023-10-15T12:27:25.000Z","size":738,"stargazers_count":52,"open_issues_count":0,"forks_count":5,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-04-14T03:01:02.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jhawthorn/fzy","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postcss.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"open_collective":"postcss","github":"ai"}},"created_at":"2015-02-05T05:30:42.000Z","updated_at":"2023-10-16T21:10:47.000Z","dependencies_parsed_at":"2023-01-14T05:28:32.680Z","dependency_job_id":"738e2024-2050-4fcc-8eb4-8759d9290604","html_url":"https://github.com/postcss/postcss-size","commit_stats":{"total_commits":95,"total_committers":5,"mean_commits":19.0,"dds":"0.26315789473684215","last_synced_commit":"23d36a5898a3ef967517e86cc2fca80d19659452"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postcss%2Fpostcss-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postcss","download_url":"https://codeload.github.com/postcss/postcss-size/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869974,"owners_count":16555409,"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":"2024-09-24T13:39:18.762Z","updated_at":"2025-10-19T09:31:48.259Z","avatar_url":"https://github.com/postcss.png","language":"JavaScript","readme":"# PostCSS Size\n\n\u003cimg align=\"right\" width=\"135\" height=\"95\"\n     title=\"Philosopher’s stone, logo of PostCSS\"\n     src=\"https://postcss.org/logo-leftp.svg\"\u003e\n\n[PostCSS] plugin for `size` shortcut to set `width` and `height` properties.\n\nIt also handles `min-size` to set `min-width` and `min-height`, and `max-size` to set `max-width` and `max-height`.\n\n[PostCSS]: https://github.com/postcss/postcss\n\n```css\n.two {\n  size: 20px 10px;\n}\n.one {\n  size: 10px;\n}\n.minmax {\n  min-size: 10px;\n  max-size: 200px auto;\n}\n```\n\n```css\n.two {\n  width: 20px;\n  height: 10px;\n}\n.one {\n  width: 10px;\n  height: 10px;\n}\n.minmax {\n  min-width: 10px;\n  min-height: 10px;\n  max-width: 200px;\n  max-height: auto;\n}\n```\n\n\u003ca href=\"https://evilmartians.com/?utm_source=postcss-size\"\u003e\n  \u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\"\n       alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\"\u003e\n\u003c/a\u003e\n\n\n## Usage\n\n**Step 1:** Install plugin:\n\n```sh\nnpm install --save-dev postcss postcss-size\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+   require('postcss-size'),\n    require('autoprefixer')\n  ]\n}\n```\n\n[official docs]: https://github.com/postcss/postcss#usage\n","funding_links":["https://opencollective.com/postcss","https://github.com/sponsors/ai"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostcss%2Fpostcss-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostcss%2Fpostcss-size/lists"}