{"_id":"@csstools/postcss-logical-viewport-units@4.0.3","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"a73e8fca0854488618af07da6fe0c74764521bb3","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-logical-viewport-units/download/@csstools/postcss-logical-viewport-units-4.0.3.tgz","fileCount":6,"integrity":"sha512-HxGmox4eZ80ZWNLFkYq5a7xFK6oGy9ztTgyIuidat+VEDge0Ry/Mq7dAMw8WYt4nquVKwsIia6TjISZuFXhMVw==","signatures":[{"sig":"MEUCIDWpOGfOul50rLmNHvBkHlWdkLgWHzzijFJXssraZomfAiEA9SdTTtssdryg6ZPyGnhd90rzjS5Xy+/VBncc32XlYlA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCchp29Ip5mG/RsNfsswq2SoS9QrTap5eW+g/NJNOWESAIhALk+YZTaphwDO/o08FmwTAQDUqknBkvBhBtt5hfwcftn"}],"unpackedSize":8321,"size":3454,"noattachment":false,"key":"/@csstools/postcss-logical-viewport-units/-/@csstools/postcss-logical-viewport-units-4.0.3.tgz"},"name":"@csstools/postcss-logical-viewport-units","type":"module","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"ce9f96324b4c5332e8fd332468da1da73eab9188","license":"MIT-0","scripts":{},"version":"4.0.3","_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units#readme","keywords":["block","css","inline","logical","postcss","postcss-plugin","unit","vb","vi","viewport-unit"],"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-logical-viewport-units"},"_npmVersion":"11.13.0","description":"Use vb and vi length units in CSS","directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"_nodeVersion":"26.1.0","contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"dependencies":{"@csstools/utilities":"^3.0.0","@csstools/css-tokenizer":"^4.0.2","@csstools/postcss-progressive-custom-properties":"^5.1.4"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-logical-viewport-units_4.0.3_1790956709415_0.5264197494461902"},"readme":"# PostCSS Logical Viewport Units [<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-logical-viewport-units --save-dev`\n\n[PostCSS Logical Viewport Units] lets you easily use `vb` and `vi` length units following the [CSS-Values-4 Specification].\n\n```css\n.foo {\n\tmargin: 10vi 20vb;\n}\n\n/* becomes */\n\n.foo {\n\tmargin: 10vw 20vh;\n\tmargin: 10vi 20vb;\n}\n```\n\n## Usage\n\nAdd [PostCSS Logical Viewport Units] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-logical-viewport-units --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssLogicalViewportUnits = require('@csstools/postcss-logical-viewport-units');\n\npostcss([\n\tpostcssLogicalViewportUnits(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\n\n## Options\n\n### inlineDirection\n\nThe `inlineDirection` option allows you to specify the direction of the inline axe. The default value is `left-to-right`, which would match any latin language.\n\n**You should tweak this value so that it is specific to your language and writing mode.**\n\n```js\npostcssLogicalViewportUnits({\n\tinlineDirection: 'top-to-bottom'\n})\n```\n\n```css\n.foo {\n\tmargin: 10vi 20vb;\n}\n\n/* becomes */\n\n.foo {\n\tmargin: 10vh 20vw;\n\tmargin: 10vi 20vb;\n}\n```\n\nEach direction must be one of the following:\n\n- `top-to-bottom`\n- `bottom-to-top`\n- `left-to-right`\n- `right-to-left`\n\nPlease do note that transformations won't do anything particular for `right-to-left` or `bottom-to-top`.\n\n### preserve\n\nThe `preserve` option determines whether the original notation\nis preserved. By default, it is preserved.\n\n```js\npostcssLogicalViewportUnits({ preserve: false })\n```\n\n```css\n.foo {\n\tmargin: 10vi 20vb;\n}\n\n/* becomes */\n\n.foo {\n\tmargin: 10vw 20vh;\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/#logical-viewport-units\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-logical-viewport-units\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Logical Viewport Units]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units\n[CSS-Values-4 Specification]: https://www.w3.org/TR/css-values-4/#viewport-relative-units\n","publish_time":1790956709507,"_cnpm_publish_time":1790956709507,"dist-tags":{"latest":"4.0.5"}}