{"name":"@csstools/postcss-logical-viewport-units","version":"2.0.1","keywords":["block","css","inline","logical","padding","postcss","postcss-plugin","viewport units"],"license":"MIT-0","_id":"@csstools/postcss-logical-viewport-units@2.0.1","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":"2921034d11d60ea7340ebe795bb4fe60f32ebbae","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-logical-viewport-units/download/@csstools/postcss-logical-viewport-units-2.0.1.tgz","fileCount":11,"integrity":"sha512-R5s19SscS7CHoxvdYNMu2Y3WDwG4JjdhsejqjunDB1GqfzhtHSvL7b5XxCkUWqm2KRl35hI6kJ4HEaCDd/3BXg==","signatures":[{"sig":"MEQCIGQgyDkTVSdSKWOEsXktgi0YhYR44YwGVRMQUN7JLSCuAiBTPX1EfPqn+0t7q6RooEI9No9jCgkQFH/NkJXdBQ40uw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12361,"size":4723,"noattachment":false,"key":"/@csstools/postcss-logical-viewport-units/-/@csstools/postcss-logical-viewport-units-2.0.1.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","volta":{"extends":"../../package.json"},"module":"dist/index.mjs","engines":{"node":"^14 || ^16 || >=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.cjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"3ccc9e463888c89d008d225a1694aeaaf291cdba","scripts":{"docs":"node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs","lint":"node ../../.github/bin/format-package-json.mjs","test":"node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs","build":"rollup -c ../../rollup/default.mjs","prepublishOnly":"npm run build && npm run test","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"csstools":{"cssdbId":"logical-viewport-units","specUrl":"https://www.w3.org/TR/css-values-4/#viewport-relative-units","exportName":"postcssLogicalViewportUnits","humanReadableName":"PostCSS Logical Viewport Units"},"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-logical-viewport-units"},"_npmVersion":"9.6.7","description":"Use vb and vi length units in CSS","directories":{},"_nodeVersion":"20.2.0","dependencies":{"@csstools/css-tokenizer":"^2.2.0"},"_hasShrinkwrap":false,"devDependencies":{"@csstools/postcss-tape":"*"},"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"tmp":"tmp/postcss-logical-viewport-units_2.0.1_1690215586088_0.7270370186246369","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[<img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@csstools/postcss-logical-viewport-units.svg\" height=\"20\">][npm-url] [<img alt=\"Build Status\" src=\"https://github.com/csstools/postcss-plugins/workflows/test/badge.svg\" height=\"20\">][cli-url] [<img alt=\"Discord\" src=\"https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white\">][discord]<br><br>[<img alt=\"Baseline Status\" src=\"https://cssdb.org/images/badges-baseline/logical-viewport-units.svg\" height=\"20\">][css-url] [<img alt=\"CSS Standard Status\" src=\"https://cssdb.org/images/badges/logical-viewport-units.svg\" height=\"20\">][css-url] \n\n```bash\nnpm install @csstools/postcss-logical-viewport-units --save-dev\n```\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[PostCSS Logical Viewport Units] runs in all Node environments, with special\ninstructions for:\n\n- [Node](INSTALL.md#node)\n- [PostCSS CLI](INSTALL.md#postcss-cli)\n- [PostCSS Load Config](INSTALL.md#postcss-load-config)\n- [Webpack](INSTALL.md#webpack)\n- [Next.js](INSTALL.md#nextjs)\n- [Gulp](INSTALL.md#gulp)\n- [Grunt](INSTALL.md#grunt)\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":1690215586313,"maintainers":[{"name":"romainmenke","email":"romainmenke@gmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_cnpm_publish_time":1690215586313,"dist-tags":{"latest":"4.0.5"}}