{"name":"@csstools/postcss-logical-viewport-units","version":"3.0.0","keywords":["block","css","inline","logical","padding","postcss","postcss-plugin","viewport units"],"license":"MIT-0","_id":"@csstools/postcss-logical-viewport-units@3.0.0","contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"76a5ff77a090ea935d0c23f290b5cf274388115c","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-logical-viewport-units/download/@csstools/postcss-logical-viewport-units-3.0.0.tgz","fileCount":7,"integrity":"sha512-7a0d7TLfHP3k7n+XGj5NJopgyKgl/VKyAPapYIo97aujB7+8M4dBE1Og0OmWng+H/drQWXoSlCI3pov5XwVtxQ==","signatures":[{"sig":"MEUCIEerIbFLNcxvp5/2nqp+MbwBsp6gxZYXXRR7JhdAopTBAiEArxjGfZEqixgwamYIQwyRrFlQOyCuEoh7s2MjkXAw+xs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9743,"size":3816,"noattachment":false,"key":"/@csstools/postcss-logical-viewport-units/-/@csstools/postcss-logical-viewport-units-3.0.0.tgz"},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"default":"./dist/index.cjs"}}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"ecb4494e53538687fb5ac82b3fca61e5b74f665a","scripts":{},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-logical-viewport-units"},"_npmVersion":"10.7.0","description":"Use vb and vi length units in CSS","directories":{},"_nodeVersion":"22.1.0","dependencies":{"@csstools/utilities":"^2.0.0","@csstools/css-tokenizer":"^3.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"tmp":"tmp/postcss-logical-viewport-units_3.0.0_1722721072921_0.1572093405315984","host":"s3://npm-registry-packages"},"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```pcss\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```pcss\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```pcss\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":1722721073107,"maintainers":[{"name":"romainmenke","email":"romainmenke@gmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_cnpm_publish_time":1722721073107,"dist-tags":{"latest":"4.0.5"}}