{"id":19653005,"url":"https://github.com/csstools/postcss-identifiers","last_synced_at":"2025-04-28T17:31:10.508Z","repository":{"id":66028388,"uuid":"89183358","full_name":"csstools/postcss-identifiers","owner":"csstools","description":"Use identifiers in CSS to write intelligent shorthands","archived":false,"fork":false,"pushed_at":"2017-05-13T03:02:48.000Z","size":40,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-22T20:21:46.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jonathantneal.github.io/postcss-identifiers/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-04-24T00:59:34.000Z","updated_at":"2023-01-21T20:49:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"72eeb98c-73cc-4547-af3d-a3f1b6f9c6a5","html_url":"https://github.com/csstools/postcss-identifiers","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"aaba45c70dd4e71006c66638d7df42e13398cd0c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-identifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-identifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-identifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-identifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-identifiers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223894647,"owners_count":17221104,"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-11-11T15:12:54.031Z","updated_at":"2024-11-11T15:12:54.870Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Identifiers [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Licensing][lic-img]][lic-url]\n[![Changelog][log-img]][log-url]\n[![Gitter Chat][git-img]][git-url]\n\n[PostCSS Identifiers] lets you use identifiers in CSS to write intelligent\nshorthands. And unlike shorthands, identifiers don’t reset every value.\n\n```css\n.margin-inline-auto {\n  margin: [inline] auto;\n}\n\n.position-start {\n  position: [type] absolute [start] 0;\n}\n\n/* after */\n\n.margin-inline-auto {\n  margin-left: auto;\n  margin-right: auto;\n}\n\n.position-start {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n```\n\nDirection            | Shorthands  | Resulting Properties\n-------------------- | ----------- | ---------------------\n`inline`             | `i` `-`     | left right\n`block`              | `b` `\\|`    | top bottom\n`start`              | `s`         | left top\n`end`                | `e`         | right bottom\n`inline-start`       | `is` `\u003c`    | left\n`inline-end`         | `ie` `\u003e`    | right\n`block-start`        | `bs` `^`    | top\n`block-end`          | `be` `v`    | bottom\n`block-inline-start` | `bis` `\\|\u003c` | left top bottom\n`block-inline-end`   | `bie` `\\|\u003e` | right top bottom\n`inline+block-start` | `ibs` `-^`  | left right top\n`inline+block-end`   | `ibe` `-v`  | left right bottom\n*(all directions)*   | `+`         | left right top bottom\n\n## Usage\n\nAdd [PostCSS Identifiers] to your build tool:\n\n```bash\nnpm install postcss-identifiers --save-dev\n```\n\n#### Node\n\nUse [PostCSS Identifiers] to process your CSS:\n\n```js\nrequire('postcss-identifiers').process(YOUR_CSS, { /* options */ });\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nUse [PostCSS Identifiers] as a plugin:\n\n```js\npostcss([\n  require('postcss-identifiers')({ /* options */ })\n]).process(YOUR_CSS, /* options */);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nUse [PostCSS Identifiers] in your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n  return gulp.src('./src/*.css').pipe(\n    postcss([\n      require('postcss-identifiers')({ /* options */ })\n    ])\n  ).pipe(\n    gulp.dest('.')\n  );\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```bash\nnpm install grunt-postcss --save-dev\n```\n\nUse [PostCSS Identifiers] in your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n  postcss: {\n    options: {\n      use: [\n        require('postcss-identifiers')({ /* options */ })\n      ]\n    },\n    dist: {\n      src: '*.css'\n    }\n  }\n});\n```\n\n[npm-url]: https://www.npmjs.com/package/postcss-identifiers\n[npm-img]: https://img.shields.io/npm/v/postcss-identifiers.svg\n[cli-url]: https://travis-ci.org/jonathantneal/postcss-identifiers\n[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-identifiers.svg\n[lic-url]: LICENSE.md\n[lic-img]: https://img.shields.io/npm/l/postcss-identifiers.svg\n[log-url]: CHANGELOG.md\n[log-img]: https://img.shields.io/badge/changelog-md-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[git-img]: https://img.shields.io/badge/chat-gitter-blue.svg\n\n[PostCSS Identifiers]: https://github.com/jonathantneal/postcss-identifiers\n[PostCSS]: https://github.com/postcss/postcss\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-identifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-identifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-identifiers/lists"}