{"id":19653022,"url":"https://github.com/csstools/postcss-short-font-size","last_synced_at":"2025-04-28T17:31:14.583Z","repository":{"id":57328494,"uuid":"42799841","full_name":"csstools/postcss-short-font-size","owner":"csstools","description":"Define line-height within the font-size property in CSS","archived":false,"fork":false,"pushed_at":"2018-11-06T16:01:52.000Z","size":24,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T05:31:42.564Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jonathantneal.github.io/postcss-short/","language":"CSS","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}},"created_at":"2015-09-20T04:17:24.000Z","updated_at":"2023-01-19T20:44:04.000Z","dependencies_parsed_at":"2022-09-21T01:52:11.400Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-short-font-size","commit_stats":null,"previous_names":["jonathantneal/postcss-short-font-size"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-font-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-font-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-font-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-short-font-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-short-font-size/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223793310,"owners_count":17203783,"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:56.810Z","updated_at":"2024-11-11T15:12:57.582Z","avatar_url":"https://github.com/csstools.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Short Font Size [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[PostCSS Short Font Size] lets you define `line-height` within the `font-size`\nproperty in CSS.\n\n```pcss\nbody {\n  font-size: 125%/1.5;\n}\n\n/* becomes */\n\nbody {\n  line-height: 1.5;\n  font-size: 125%;\n}\n```\n\n## Usage\n\nAdd [PostCSS Short Font Size] to your project:\n\n```bash\nnpm install postcss-short-font-size --save-dev\n```\n\nUse [PostCSS Short Font Size] to process your CSS:\n\n```js\nconst postcssShortFontSize = require('postcss-short-font-size');\n\npostcssShortFontSize.process(YOUR_CSS /*, processOptions, pluginOptions */);\n```\n\nOr use it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssShortFontSize = require('postcss-short-font-size');\n\npostcss([\n  postcssShortFontSize(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Short Font Size] runs in all Node environments, with special\ninstructions for:\n\n| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |\n| --- | --- | --- | --- | --- | --- |\n\n## Options\n\n#### prefix\n\nThe `prefix` option defines a prefix required by properties being transformed.\nWrapping dashes are automatically applied, so that `x` would transform\n`-x-font-size`.\n\n```js\npostcssShortFontSize({ prefix: 'x' });\n```\n\n```pcss\nbody {\n  -x-font-size: 125%/1.5;\n}\n\n/* becomes */\n\nbody {\n  line-height: 1.5;\n  font-size: 125%;\n}\n```\n\n#### skip\n\nThe `skip` option defines the skip token used to ignore portions of the\nshorthand.\n\n```js\npostcssShortFontSize({ skip: '-' });\n```\n\n```pcss\nbody {\n  font-size: -/125%;\n}\n\n/* becomes */\n\nbody {\n  font-size: 125%;\n}\n```\n\nNote: If the skip token is made to be a space then certain values with\n`!important` may not work properly, such as `font-size: 200% !important 1.5`.\n\n[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-short-font-size.svg\n[cli-url]: https://travis-ci.org/jonathantneal/postcss-short-font-size\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/postcss-short-font-size.svg\n[npm-url]: https://www.npmjs.com/package/postcss-short-font-size\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Short Font Size]: https://github.com/jonathantneal/postcss-short-font-size\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-short-font-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-short-font-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-short-font-size/lists"}