{"_id":"@csstools/postcss-font-width-property","_rev":"4266234","name":"@csstools/postcss-font-width-property","description":"Use the font-width property in CSS","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"romainmenke","email":""}],"time":{"modified":"2026-04-06T16:28:51.000Z","created":"2026-02-21T15:05:06.744Z","1.0.0":"2026-02-21T15:05:06.744Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-font-width-property"},"versions":{"1.0.0":{"name":"@csstools/postcss-font-width-property","description":"Use the font-width property in CSS","version":"1.0.0","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"MIT-0","funding":[{"type":"github","url":"https://github.com/sponsors/csstools"},{"type":"opencollective","url":"https://opencollective.com/csstools"}],"engines":{"node":">=20.19.0"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"dependencies":{"@csstools/utilities":"^3.0.0"},"peerDependencies":{"postcss":"^8.4"},"scripts":{},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-width-property#readme","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-font-width-property"},"bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"keywords":["font-width","postcss-plugin"],"gitHead":"abcd069ad24e2394eb565e82eb45528d49bf620a","_id":"@csstools/postcss-font-width-property@1.0.0","_nodeVersion":"25.1.0","_npmVersion":"11.6.2","dist":{"shasum":"a9d92752da085b454d1bde55060bcb8763f6538c","size":2456,"noattachment":false,"key":"/@csstools/postcss-font-width-property/-/@csstools/postcss-font-width-property-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/postcss-font-width-property/download/@csstools/postcss-font-width-property-1.0.0.tgz"},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"romainmenke","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-font-width-property_1.0.0_1771686306584_0.8234740699029248"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-21T15:05:06.744Z","publish_time":1771686306744,"_source_registry_name":"default","_cnpm_publish_time":1771686306744}},"readme":"# PostCSS Font Width Property [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n`npm install @csstools/postcss-font-width-property --save-dev`\n\n[PostCSS Font Width Property] lets you use the `font-width` property and descriptor follow the [CSS Fonts Specification].\n\n```css\n@font-face {\n\tsrc: url(\"foo.ttf\");\n\tfont-family: \"foo\";\n\tfont-style: normal;\n\tfont-width: 1% 1000%;\n}\n\n.foo {\n\tfont-width: 50%;\n}\n\n/* becomes */\n\n@font-face {\n\tsrc: url(\"foo.ttf\");\n\tfont-family: \"foo\";\n\tfont-style: normal;\n\tfont-stretch: 1% 1000%;\n}\n\n.foo {\n\tfont-stretch: 50%;\n}\n```\n\n## Usage\n\nAdd [PostCSS Font Width Property] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-font-width-property --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssFontWidthProperty = require('@csstools/postcss-font-width-property');\n\npostcss([\n\tpostcssFontWidthProperty(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\n\n## Options\n\n### preserve\n\nThe `preserve` option determines whether the original notation\nis preserved. By default, it is not preserved.\n\n```js\npostcssFontWidthProperty({ preserve: true })\n```\n\n```css\n@font-face {\n\tsrc: url(\"foo.ttf\");\n\tfont-family: \"foo\";\n\tfont-style: normal;\n\tfont-width: 1% 1000%;\n}\n\n.foo {\n\tfont-width: 50%;\n}\n\n/* becomes */\n\n@font-face {\n\tsrc: url(\"foo.ttf\");\n\tfont-family: \"foo\";\n\tfont-style: normal;\n\tfont-stretch: 1% 1000%;\n\tfont-width: 1% 1000%;\n}\n\n.foo {\n\tfont-stretch: 50%;\n\tfont-width: 50%;\n}\n```\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#font-width-property\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-font-width-property\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Font Width Property]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-width-property\n[CSS Fonts Specification]: https://drafts.csswg.org/css-fonts/#font-stretch-prop\n","_attachments":{},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-width-property#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"license":"MIT-0"}