{"name":"postcss-merge-longhand","version":"9.2.1","keywords":["css","minify","optimise","postcss","postcss-plugin"],"author":{"url":"https://beneb.info","name":"Ben Briggs","email":"beneb.info@gmail.com"},"license":"MIT","_id":"postcss-merge-longhand@9.2.1","maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"},{"name":"ludovicofischer","email":"livrerie@gmail.com"},{"name":"ai","email":"andrey@sitnik.es"},{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"andyjansson","email":"jansson.andy@gmail.com"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"cssnano-bot","email":"sahaaniketh@gmail.com"}],"homepage":"https://github.com/cssnano/cssnano","bugs":{"url":"https://github.com/cssnano/cssnano/issues"},"dist":{"shasum":"e8f6d138dac8cb3d55ab40bf6a790ef5b1da7440","tarball":"http://registry-npm.ywwl.com/postcss-merge-longhand/download/postcss-merge-longhand-9.2.1.tgz","fileCount":135,"integrity":"sha512-dYwIiRP/lH2ItiUo/t9QG/Vn0ac5dPjISTTosF8yfU0PaFZcRYb8mnO82LxQtfYfUqtzWduYGrGVDyLi8N5xxQ==","signatures":[{"sig":"MEUCIGrIIF2yOtDmoNjWh1/Xs+imtTI9DXEGZsxe/35vBZQAAiEA5FDRstkhrjvnoZeffWk70QxiU8AoB2d/nwAdsMIyfBE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCdVlTTbsaRp1Qj/4nJt/BN3wz9hiO1g5Gmn+yr/pxf3wIgbHIFuNHqp34dRWV4HuIDzXPHhai2Ou+kR36QrXwmuZg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-merge-longhand@9.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":246345,"size":61942,"noattachment":false,"key":"/postcss-merge-longhand/-/postcss-merge-longhand-9.2.1.tgz"},"main":"./src/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":"^22.22.3 || ^24.15.0 || >=26.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"},"./package.json":"./package.json"},"imports":{"#getBrowsersList":{"node":"./src/lib/computeBrowsersToSupport.js","default":"./src/lib/getBrowsersForWebBuild.js"}},"scripts":{"fuzz":"node ./script/fuzz.js","test":"node --test","acquire":"node ./script/acquire.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"591420ef-cbc7-4a9a-8bfd-7b9c32fd202a"}},"repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"description":"Merge longhand properties into shorthand with PostCSS.","directories":{},"dependencies":{"stylehacks":"^9.0.7","browserslist":"^4.29.3","cssnano-utils":"^8.2.0","@csstools/css-tokenizer":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.28","@webref/css":"8.7.5","@mdn/browser-compat-data":"^8.1.4"},"peerDependencies":{"postcss":"^8.5.28"},"_npmOperationalInternal":{"tmp":"tmp/postcss-merge-longhand_9.2.1_1791237948862_0.8568672490246718","host":"s3://npm-registry-packages-npm-production"},"readme":"# [postcss][postcss]-merge-longhand\n\n> Merge longhand properties into shorthand with PostCSS.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-merge-longhand) do:\n\n```\nnpm install postcss-merge-longhand --save\n```\n\n## Example\n\nMerge longhand properties into shorthand; works with `margin`, `padding`,\n`inset`, `scroll-margin`, `scroll-padding`, `border`, `columns` and the box\nalignment `place-*` shorthands. For more examples see the [tests](test).\n\n### Input\n\n```css\nh1 {\n  margin-top: 10px;\n  margin-right: 20px;\n  margin-bottom: 10px;\n  margin-left: 20px;\n}\n\nh2 {\n  column-width: 12em;\n  column-count: 2;\n}\n```\n\n### Output\n\n```css\nh1 {\n  margin: 10px 20px;\n}\n\nh2 {\n  columns: 12em 2;\n}\n```\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Browser support\n\nA browser that does not know `place-content`, `place-items` or `place-self`\nignores the whole declaration and loses both axes. The plugin therefore merges\nalignment longhands into these shorthands only when every browser in your\n[Browserslist](https://github.com/browserslist/browserslist) targets is known to\nsupport all three. A target without compatibility data, such as Opera Mini,\ncounts as unsupported, so the Browserslist `defaults` query keeps the longhands.\n\nThe plugin accepts the Browserslist options `overrideBrowserslist`, `stats`,\n`path` and `env`. The browser build for the web has no access to your targets\nand assumes a fixed list that includes KaiOS, UC Browser and QQ Browser for\nAndroid, so it keeps the longhands.\n\nValues that a target may not parse, such as `safe`, `unsafe`, `last baseline`,\n`left`, `right`, `legacy`, `anchor-center` and `safe normal`, merge only with a\nvalue that depends on the same keywords. A browser that lacks one of them\ndrops the whole shorthand, where it would drop only one longhand.\n\nThe same holds for `inset`, the `-block` and `-inline` shorthands of `margin`,\n`padding`, `inset`, `scroll-margin` and `scroll-padding`, and the `scroll-margin`\nand `scroll-padding` shorthands, which arrived long after their longhands.\nThe plugin creates or grows one only when every target supports it, and\notherwise keeps the longhands. It still shortens a shorthand that is already\nthere.\n\n## Writing modes\n\nA flow-relative property such as `margin-block-start` sets a different physical\nside depending on the `writing-mode` and `direction` of the element, which any\nother rule may set. The plugin therefore never assumes either. It moves a\ndeclaration, or drops one that a later declaration overrides, only when the\nresult is the same for every combination of the two. A physical declaration\n(`margin-top`) between a flow-relative one and its shorthand stops the move,\nand so does the legacy `scroll-snap-margin-*` spelling.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/main/CONTRIBUTORS.md).\n\n## License\n\nMIT © [Ben Briggs](https://beneb.info)\n\n[postcss]: https://github.com/postcss/postcss\n","publish_time":1791237948978,"_cnpm_publish_time":1791237948978,"dist-tags":{"latest":"9.4.0","next":"5.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}