{"name":"css-shorthand-properties","description":"A simple list of CSS shorthand properties and which longhand properties they expand to","keywords":["css","shorthand","short","list"],"version":"1.1.1","author":{"name":"Gilmore Davidson"},"homepage":"https://github.com/gilmoreorless/css-shorthand-properties","repository":{"type":"git","url":"git://github.com/gilmoreorless/css-shorthand-properties.git"},"main":"index.js","licenses":[{"type":"MIT","url":"http://gilmoreorless.mit-license.org/"}],"gitHead":"2dc6a7ce94383ba00707445becd9f21418d2d369","bugs":{"url":"https://github.com/gilmoreorless/css-shorthand-properties/issues"},"_id":"css-shorthand-properties@1.1.1","_npmVersion":"6.2.0","_nodeVersion":"9.3.0","_npmUser":{"name":"gilmoreorless","email":"gilmoreorless@gmail.com"},"dist":{"integrity":"sha512-Md+Juc7M3uOdbAFwOYlTrccIZ7oCFuzrhKYQjdeUEW/sE1hv17Jp/Bws+ReOPpGVBTYCBoYo+G17V5Qo8QQ75A==","shasum":"1c808e63553c283f289f2dd56fcee8f3337bd935","tarball":"http://registry-npm.ywwl.com/css-shorthand-properties/download/css-shorthand-properties-1.1.1.tgz","fileCount":5,"unpackedSize":11182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbTUKHCRA9TVsSAnZWagAAzB0P/1nhkSv7izDOdey0vu4w\n2A2aYsMz80V82qA/0hzsxmC9/5tM5YvtLZLMvFVDmovJir2EP94AJmmMN98X\nQsikVqs6IMw5kIZpE3vxGJddd+2e0axjH6Y0bS76nHZdHCDNwdSMp1BhQoqD\n6ZxR5HxUmb43toj2k6/h5/jmHJrISzR8REjxfw6DDcN3QYkh6CA3gtjuGptb\nZitT5/MhNt7wfzcGiwcuPYroPZypdNDgeAFZxFFSImPgimsPrI87hF8IqthF\nQFxbht7vdbocg2kkEGBbfSqyyXdQtQD5nqEOStsWRS4aNpUkMubtr+5zK4fn\nhoipUZt+ebhJAY6uyG5HgZUfl0C9hUr+jZ6Bf6H8/DAd8myD3twCn71RPi3U\ntoJtCCHGIUIYE4xvyh2u/nf8dZbPSsY4E1jhXtz2+7vNnlHtM/bjpTP+AIMk\nOJISTK0DolsNPBOA8c5aud9P5ogxFZLKRb/FpfN6uLz3nh23UcvLfliqay+x\nvebVuqObiIyTphoMOr7hu0ZYjR/EbM1GZKwXGlmtTRa1q3RqpDcp+d3QxT6M\nO+8fPPEZGXUrsS1TF+PrSAKBt6SqFkHhgWiF4pUglKUSLe19IwuWRVBRAdvo\nMy8oC1X+N6oVO6+ot0UoApLTAfys/kZ8KSfE06DBUYq93536SCqo78gHsr23\nzI87\r\n=pxsm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFrxOL6ef+OmG+1Uf2nxhlCHtt9GSjYqTm5wMUFM+MbOAiAb9kMVk++CoOXCOYsNNE84mSNxNBZojDOwpZz9bTkhvQ=="}],"size":3972,"noattachment":false,"key":"/css-shorthand-properties/-/css-shorthand-properties-1.1.1.tgz"},"maintainers":[{"name":"gilmoreorless","email":"gilmoreorless@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-shorthand-properties_1.1.1_1531789959445_0.9688998812837999"},"_hasShrinkwrap":false,"readme":"# CSS Shorthand Properties\n\nA simple way to list all [shorthand](https://www.w3.org/TR/CSS2/about.html#shorthand) CSS properties and which properties they expand to.\n\nI tried to search for an existing simple list but couldn't find one, so I trawled through the various [W3C CSS specs](https://www.w3.org/Style/CSS/current-work) and collated the data.\n\nOnly specs that are Candidate Recommendations or better are counted, with the exception of some Working Drafts that have a lot of traction in browser implementations. So far the WD specs included here are Animation and Transitions.\n\n## Usage\n\nAvailable on npm as `css-shorthand-properties`, or in the browser as a global called `cssShorthandProps`\n\n### Properties\n\n#### shorthandProperties\n\nThe core data as a simple JS object. Each key is a CSS shorthand property. Each value is a compacted list of CSS properties that the shorthand expands to.\n\nThere is a convenience method (listed below) that means you shouldn’t need to access this list directly, but it’s available for other use cases.\n\n\n### Methods\n\n#### isShorthand\n\n* Returns a boolean indicating if a CSS property is a shorthand.\n* **Parameters**:\n    * `property` _(String)_ Shorthand property to expand.\n* **Returns**: _Boolean_\n\n```js\ncssShorthandProps.isShorthand('border');  // true\ncssShorthandProps.isShorthand('display');  // false\n```\n\n#### expand\n\n* Takes a CSS shorthand property and returns a list of longhand properties.\n* **Parameters**:\n    * `property` _(String)_ Shorthand property to expand.\n    * `recurse` _(Boolean – optional, default `false`)_ If true, each longhand property will also be run through `expand()`. This is only useful for the `border` property.\n* **Returns**: _Array_ with a list of longhand properties that the given property expands to. If the property is not a shorthand, the array contains only the original property.\n\n```js\n// Standard usage\ncssShorthandProps.expand('list-style');\n// ['list-style-type', 'list-style-position', 'list-style-image']\n\n// Non-shorthand properties return themselves in an array\ncssShorthandProps.expand('color');\n// ['color']\n\n// Using 'border' in normal mode...\ncssShorthandProps.expand('border');\n// ['border-width', 'border-style', 'border-color']\n\n// ...but the border properties are also shorthands\ncssShorthandProps.expand('border-width');\n// ['border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width']\n\n// Using 'border' with recursion returns an array of arrays\ncssShorthandProps.expand('border', true);\n/*\n[\n  ['border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'],\n  ['border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style'],\n  ['border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color']\n]\n*/\n```\n\n## Licence\n\nMIT: [https://gilmoreorless.mit-license.org/]()\n\n","publish_time":1531789959547,"_cnpm_publish_time":1531789959547,"dist-tags":{"latest":"1.1.2"}}