{"_id":"@adp-psych/stylelint-use-logical","_rev":"3-a3a3c2a9d7e06f87196418f681c49f43","name":"@adp-psych/stylelint-use-logical","dist-tags":{"latest":"2.0.1-1"},"versions":{"2.0.1-0":{"name":"@adp-psych/stylelint-use-logical","version":"2.0.1-0","description":"Enforce usage of logical properties and values in CSS","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-use-logical.git"},"homepage":"https://github.com/csstools/stylelint-use-logical#readme","bugs":{"url":"https://github.com/csstools/stylelint-use-logical/issues"},"main":"index.cjs.js","module":"index.es.mjs","scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"npm run test:js && npm run test:tape","test:js":"eslint *.js lib/*.js --cache --ignore-path .gitignore --quiet","test:tape":"stylelint-tape"},"engines":{"node":">=8.0.0"},"devDependencies":{"@babel/core":"^7.12.10","@babel/preset-env":"^7.12.11","babel-eslint":"^10.1.0","eslint":"^7.16.0","eslint-config-dev":"^2.0.0","np":"^7.1.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","stylelint":"^13.8.0","stylelint-tape":"^2.0.0"},"peerDependencies":{"stylelint":"^13.8.0"},"eslintConfig":{"extends":"dev","parser":"babel-eslint"},"keywords":["stylelint","stylelint-plugin","css","logical","properties","property","flow","relative","values","value","ltr","rtl","directional","dir","inline","block","start","end","align","border","clear","float","margin","padding","size","text"],"publishConfig":{"access":"public"},"gitHead":"a5ca867f7e202b96a63248050f35f7547461f1ca","_id":"@adp-psych/stylelint-use-logical@2.0.1-0","_nodeVersion":"15.5.0","_npmVersion":"7.3.0","dist":{"integrity":"sha512-iM0LVixHhe7zZKYut+WzqspxUnvxcp8vRi/cHVT1Za6PSa2eXX/G0L/Pe0g2wvF60cVFUVd97FuNTNjEQLSsfQ==","shasum":"dace961160055e89b534602b8f5af26e9ab39dad","tarball":"https://registry.npmjs.org/@adp-psych/stylelint-use-logical/-/stylelint-use-logical-2.0.1-0.tgz","fileCount":8,"unpackedSize":73055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6/AoCRA9TVsSAnZWagAA0sIP/1sCy9IiChETPITGGe/a\nC+Z0I+5z2hynmqks7VmURkHR2UV7SpcY9/dVgaVyVC97NVUCQJn5MvSXROic\nH2tQTMeeCIDvEKF7VV582MGD3szW8zxXg+y8MptdcUvQ/A5LgbheppMEmwbG\nbJkUW0Ymeae+pqy0ZSvUtWxGwTC9P+ryZCoil5oJ5rRJsTOjAY44liP/U4+Q\nSrtK8BYNwIw+mgo5yJ/5atjoiV8reAsbKTDHTw7CkG16jWqvXW/G7wGibQeH\nqdm78AQgzrLivQgV7eTa19wNNMyAaITW8R94k8FWCm8Jr3rmnBm5C5xDCW8a\nb/LJ2uOnlOOpXpn30Uqo90IhGpYy0L6GCz2vhtyilKhyRDvmCeuNWtawU+JU\nGw3c/4xN5vVQZdjplWGJTeEviaM86OUrG1HDNmAO1xA2SdvbJru+WEFFm3Ot\ncASEU7fyUMF0BHpVRMtnpnN8OIHUAxl7pgK3zlarTpUbWrOtul4ZraNuRPO9\nHr+HBOqFHOkodf1xqrY7cMYqrlCOwpXrgr+u+Ekxtp8gG2MS62VsXAMjRX5y\n6U7pGvn/51f0U+LD34rfPeDCjA0Ff8ZwCwgNXhqUxNZWEI8Zohy5AA/zaOhx\nmj1lNlC3but3vlPmY2YB5vltBHLAEznbTgT6MaCF3vRTu3KMMreglQEdfupU\n6R3C\r\n=DDax\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDn/I03Mf0Sr4E5TekjoFPmUZV3YUDQ0n2YG6yiMbm+vAIgTlh3GkCPmHCsF6N2otmHICnT3zpVQ6D/breMEigmqLU="}]},"_npmUser":{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"},"directories":{},"maintainers":[{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stylelint-use-logical_2.0.1-0_1609297959611_0.21483658455366328"},"_hasShrinkwrap":false,"deprecated":"Use stylelint-use-logical-spec instead."},"2.0.1-1":{"name":"@adp-psych/stylelint-use-logical","version":"2.0.1-1","description":"Enforce usage of logical properties and values in CSS","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-use-logical.git"},"homepage":"https://github.com/csstools/stylelint-use-logical#readme","bugs":{"url":"https://github.com/csstools/stylelint-use-logical/issues"},"main":"index.cjs.js","module":"index.es.mjs","scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"npm run test:js && npm run test:tape","test:js":"eslint *.js lib/*.js --cache --ignore-path .gitignore --quiet","test:tape":"stylelint-tape"},"engines":{"node":">=8.0.0"},"devDependencies":{"@babel/core":"^7.12.10","@babel/preset-env":"^7.12.11","babel-eslint":"^10.1.0","eslint":"^7.16.0","eslint-config-dev":"^2.0.0","np":"^7.1.0","pre-commit":"^1.2.2","rollup":"^2.35.1","rollup-plugin-babel":"^4.4.0","stylelint":"^13.8.0","stylelint-tape":"^2.0.0"},"peerDependencies":{"stylelint":"^13.8.0"},"eslintConfig":{"extends":"dev","parser":"babel-eslint"},"keywords":["stylelint","stylelint-plugin","css","logical","properties","property","flow","relative","values","value","ltr","rtl","directional","dir","inline","block","start","end","align","border","clear","float","margin","padding","size","text"],"publishConfig":{"access":"public"},"gitHead":"9a1f5cec0e1ca3399c9d5b02aa94a2eb436df345","_id":"@adp-psych/stylelint-use-logical@2.0.1-1","_nodeVersion":"16.8.0","_npmVersion":"7.22.0","dist":{"integrity":"sha512-6GzwHjEqPm97nwLXKe0ydVUdgH0V4EdDSMbJripxBaMYyLoV/NuWllSSVMw3b3ZbSjztsx2Vd6DiLy7fBoCPPQ==","shasum":"ee2e4c58a456558a5dd1e41d69096dcacd234d5b","tarball":"https://registry.npmjs.org/@adp-psych/stylelint-use-logical/-/stylelint-use-logical-2.0.1-1.tgz","fileCount":7,"unpackedSize":72609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhM6aMCRA9TVsSAnZWagAAmsAP/iW3pCmMTiVpNdkeQviP\nUQVkybP7vhuADtidsYWnTrVPNmMV86q/YYQITy4TnNFLxqIqAk9jPLd6NyCv\nMpuYxI2E3D6a86OJ62mx4mvmLM8n+u1RBtmDl5T/BdYuH9b3Ouypr3i5cLAA\nIHnRd3vtM6Aj2UWLV/iZAjY/+IFaiJtkuMKr27fc/906zKSDzJQDGwbQakBA\nFf14fJm1NCmAomlZ7d/lAkNYNFKnCWYj27cJIrv/JAP0namkjLWG+DxQVuWb\ncvj2e5fYdeDsNsr4sg3E6gOBhGpreXEC6khnLo961NMFaKEHqd22Po0PsNsY\nBxNyJqgU44fH/R/kQUcLZynZSAz4knfLv0/JQpC0nqfECizWONr6SMyP9ROL\njZQQiuDCbVC4BjIPeMiJ5hG8bFEBbuCatJGnStaXzH1+MFH648hgJtLnUjwW\nVH/SKRsNT2j+nfKsJCTmcbWZ/IBbm8iQAQHwbJu4MN4p25Is/hzl0Spj6CJC\n2IhpglNLfbUaIHOZSGrZxWzuskRSY4Xm7bJ9fOePZebFE7cpFO9TGSozhcUy\n3Zt0VAGlN7fQcTwJfCuiDMjm5DQSs8ePE2icW7Up46Qqp1blkmi7zQBNIkII\nJgLtlyz/icR24ytgY1JDXlrkFVroud6Fjj/TnjvP78xoe79xAJ9jdNflYqX/\nWA+Q\r\n=gVD+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFM/eJieuPp2RfSKnRJBtKvkiL0sO/YAyxp/LlrqmpiAIgMBZr+T/I8ZuT7OBxevceE6nMVhZmpK2PYmURBEAuGb0="}]},"_npmUser":{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"},"directories":{},"maintainers":[{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/stylelint-use-logical_2.0.1-1_1630774924333_0.21040649464614325"},"_hasShrinkwrap":false,"deprecated":"Use stylelint-use-logical-spec instead."}},"time":{"created":"2020-12-30T03:12:39.549Z","2.0.1-0":"2020-12-30T03:12:39.737Z","modified":"2022-04-04T11:36:38.137Z","2.0.1-1":"2021-09-04T17:02:04.544Z"},"maintainers":[{"name":"adp-psych","email":"anthony.dipietro@research.uwa.edu.au"}],"description":"Enforce usage of logical properties and values in CSS","homepage":"https://github.com/csstools/stylelint-use-logical#readme","keywords":["stylelint","stylelint-plugin","css","logical","properties","property","flow","relative","values","value","ltr","rtl","directional","dir","inline","block","start","end","align","border","clear","float","margin","padding","size","text"],"repository":{"type":"git","url":"git+https://github.com/csstools/stylelint-use-logical.git"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"bugs":{"url":"https://github.com/csstools/stylelint-use-logical/issues"},"license":"CC0-1.0","readme":"# Property Use Logical [<img src=\"https://jonathantneal.github.io/stylelint-logo.svg\" alt=\"stylelint\" width=\"90\" height=\"90\" align=\"right\">][stylelint]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[Property Use Logical] is a [stylelint] rule to enforce the usage of\n[Logical Properties and Values] in CSS.\n\n**This package is deprecated. Use `stylelint-use-logical-spec` instead.**\n\nPhysical dimensions and directions are described _left_ to _right_ and _top_ to\n_bottom_, while their logical counterparts are described _start_ to _end_ and\n_inline_ or _block_.\n\n---\n\nFor example, to add spacing before the start of a paragraph, we might use the\nphysical `padding-left` property.\n\n```css\np {\n  padding-left: 2em;\n}\n```\n\nWere the content Hebrew or Arabic — flowing _right to left_ — then we might\nuse alternating `padding-left` and `padding-right` properties.\n\n```css\np:dir(ltr) {\n  padding-left: 2em;\n}\n\np:dir(rtl) {\n  padding-right: 2em;\n}\n```\n\nSelector weight aside, we can instead use the logical `padding-inline-start`\nproperty.\n\n```css\np {\n  padding-inline-start: 2em;\n}\n```\n\nSimilarly, physical _horizontal_ and _vertical_ dimensions are described\nmore succinctly using their logical counterparts.\n\n```css\nh1, h2, h3 {\n  margin-top: 1em;\n  margin-bottom: 1em;\n}\n\nblockquote {\n  margin-left: 1em;\n  margin-right: 1em;\n}\n\n/* becomes */\n\nh1, h2, h3 {\n  margin-block: 1em;\n}\n\nblockquote {\n  margin-inline: 1em;\n}\n```\n\n## Usage\n\nAdd [stylelint] and [Property Use Logical] to your project.\n\n```bash\nnpm install stylelint stylelint-use-logical --save-dev\n```\n\nAdd [Property Use Logical] to your [stylelint configuration].\n\n```js\n{\n  \"plugins\": [\n    \"stylelint-use-logical\"\n  ],\n  \"rules\": {\n    \"csstools/use-logical\": (\"always\" || true) || (\"ignore\" || false || null)\n  }\n}\n```\n\n## Options\n\n### always\n\nThe `\"always\"` option (alternatively `true`) requires logical properties and\nvalues to be used, and the following patterns are _not_ considered violations:\n\n```pcss\n.inset {\n  inset: 0;\n}\n\n.margin {\n  margin-inline-start: 0;\n}\n\n.padding {\n  padding-inline: 0;\n}\n\n.float {\n  float: inline-start;\n}\n\n.text-align {\n  text-align: start;\n}\n\n.text-align-ignored:dir(ltr) {\n  text-align: left;\n}\n```\n\nWhile the following patterns _are_ considered violations:\n\n```pcss\n.inset {\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n}\n\n.margin {\n  margin-left: 0;\n}\n\n.padding {\n  padding-left: 0;\n  padding-right: 0;\n}\n\n.float {\n  float: left;\n}\n\n.text-align {\n  text-align: left;\n}\n```\n\n### ignore\n\nThe `\"ignore\"` option (alternatively `false` or `null`) disables the rule.\n\n## Secondary Options\n\n### except\n\nThe `except` option ignores reporting or autofixing properties and values\nmatching a case-insensitive string or regular expression.\n\n```js\n{\n  \"rules\": {\n    \"csstools/use-logical\": [\"always\", { \"except\": ['float', /^margin/i] }]\n  }\n}\n```\n\n### direction\n\nThe `direction` option controls whether _left to right_ or _right to left_\nproperties and values should be reported or autofixed.\n\n```js\n{\n  \"rules\": {\n    \"csstools/use-logical\": [\"always\", { \"direction\": \"ltr\" || \"rtl\" }]\n  }\n}\n```\n\n## Property and Value Mapping\n\nAssuming _left to right_ directionality:\n\n| Physical Property | Logical Property       |\n| ----------------- | ---------------------- |\n| `top`             | `inset-block-start`    |\n| `right`           | `inset-inline-end`     |\n| `bottom`          | `inset-block-end`      |\n| `left`            | `inset-inline-start`   |\n\n| Physical Property | Logical Property       |\n| ----------------- | ---------------------- |\n| `margin-top`      | `margin-block-start`   |\n| `margin-right`    | `margin-inline-end`    |\n| `margin-bottom`   | `margin-block-end`     |\n| `margin-left`     | `margin-inline-start`  |\n\n| Physical Property | Logical Property       |\n| ----------------- | ---------------------- |\n| `padding-top`     | `padding-block-start`  |\n| `padding-right`   | `padding-inline-end`   |\n| `padding-bottom`  | `padding-block-end`    |\n| `padding-left`    | `padding-inline-start` |\n\n[cli-img]: https://img.shields.io/travis/csstools/stylelint-use-logical.svg\n[cli-url]: https://travis-ci.org/csstools/stylelint-use-logical\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/stylelint/stylelint\n[npm-img]: https://img.shields.io/npm/v/stylelint-use-logical.svg\n[npm-url]: https://www.npmjs.com/package/stylelint-use-logical\n\n[Logical Properties and Values]: https://www.w3.org/TR/css-logical-1/\n[stylelint]: https://github.com/stylelint/stylelint\n[stylelint configuration]: https://github.com/stylelint/stylelint/blob/master/docs/user-guide/configuration.md#readme\n[Property Use Logical]: https://github.com/csstools/stylelint-use-logical\n","readmeFilename":"README.md"}