{"id":19653010,"url":"https://github.com/csstools/postcss-short-text","last_synced_at":"2025-04-28T17:31:10.773Z","repository":{"id":46193697,"uuid":"42866553","full_name":"csstools/postcss-short-text","owner":"csstools","description":"Use a shorthand text property in CSS","archived":false,"fork":false,"pushed_at":"2021-11-08T11:15:25.000Z","size":132,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T05:31:42.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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}},"created_at":"2015-09-21T13:01:41.000Z","updated_at":"2023-04-02T05:48:10.000Z","dependencies_parsed_at":"2022-09-08T11:30:36.776Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-short-text","commit_stats":null,"previous_names":["jonathantneal/postcss-short-text"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-short-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224124800,"owners_count":17259746,"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.448Z","updated_at":"2024-11-11T15:12:55.349Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Short Text [![Build Status][ci-img]][ci]\n\n\u003cimg align=\"right\" width=\"135\" height=\"95\" src=\"http://postcss.github.io/postcss/logo-leftp.png\" title=\"Philosopher’s stone, logo of PostCSS\"\u003e\n\n[Short Text] is a [PostCSS] plugin that lets you use a shorthand `text` property in CSS.\n\n```css\n/* before */\n\nsection {\n    text: bold center uppercase dimgrey 1.25em 1.5 .05em;\n}\n\narticle {\n    text: 1.25em * .05em;\n}\n\n/* after */\n\nsection {\n    font-weight: bold;\n    text-align: center;\n    text-transform: uppercase;\n    color: dimgrey;\n    font-size: 1.25em;\n    line-height: 1.5;\n    letter-spacing: .05em;\n}\n\narticle {\n    font-size: 1.25em;\n    letter-spacing: .05em;\n}\n```\n\nProperties are matched into groups that may be written in any order. Once a property is matched to a group, other properties from that group must then be written before properties of another group. Asterisks indicate that an individual property in a group should be skipped. The groups include:\n\n- `color`\n- `font-style`, `font-variant`, `font-weight`, `font-stretch`\n- `text-decoration`, `text-align`, `text-rendering`, `text-transform`\n- `white-space`\n- `font-size`, `line-height`, `letter-spacing`, `word-spacing`\n\n## Usage\n\nFollow these steps to use [Short Text].\n\nAdd [Short Text] to your build tool:\n\n```bash\nnpm install postcss-short-text --save-dev\n```\n\n#### Node\n\n```js\nrequire('postcss-short-text')({ /* options */ }).process(YOUR_CSS);\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nLoad [Short Text] as a PostCSS plugin:\n\n```js\npostcss([\n    require('postcss-short-text')({ /* options */ })\n]);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nEnable [Short Text] within your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n    return gulp.src('./css/src/*.css').pipe(\n        postcss([\n            require('postcss-short-text')({ /* options */ })\n        ])\n    ).pipe(\n        gulp.dest('./css')\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\nEnable [Short Text] within your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n    postcss: {\n        options: {\n            processors: [\n                require('postcss-short-text')({ /* options */ })\n            ]\n        },\n        dist: {\n            src: 'css/*.css'\n        }\n    }\n});\n```\n\n## Options\n\n#### `prefix`\n\nType: `String`  \nDefault: `null`\n\nSpecifies a prefix to be surrounded by dashes before the declaration (e.g. `-x-text`).\n\n[ci]: https://travis-ci.org/jonathantneal/postcss-short-text\n[ci-img]: https://travis-ci.org/jonathantneal/postcss-short-text.svg\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[PostCSS]: https://github.com/postcss/postcss\n[Short Text]: https://github.com/jonathantneal/postcss-short-text\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-short-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-short-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-short-text/lists"}