{"name":"@emmetio/css-abbreviation","version":"2.1.4","description":"Parses Emmet CSS abbreviation into AST tree","main":"./dist/css-abbreviation.cjs.js","module":"./dist/css-abbreviation.es.js","types":"./dist/index.d.ts","scripts":{"lint":"tslint ./src/*.ts","test":"mocha","build":"rollup -c","clean":"rm -rf ./dist","prepare":"npm run lint && npm test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/emmetio/emmet.git"},"keywords":[],"author":{"name":"Sergey Chikuyonok","email":"serge.che@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/emmetio/emmet/issues"},"homepage":"https://github.com/emmetio/emmet#readme","dependencies":{"@emmetio/scanner":"^1.0.0"},"devDependencies":{"@types/mocha":"^7.0.2","@types/node":"^12.7.2","mocha":"^7.1.1","rollup":"^2.6.0","rollup-plugin-typescript2":"^0.27.0","ts-lint":"^4.5.1","ts-node":"^8.8.2","typescript":"^3.8.3"},"directories":{"test":"test"},"mocha":{"require":"ts-node/register","spec":"./test/*.ts"},"gitHead":"94fb2871d555636cadd7b48906980d3a87fc66c8","_id":"@emmetio/css-abbreviation@2.1.4","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-qk9L60Y+uRtM5CPbB0y+QNl/1XKE09mSO+AhhSauIfr2YOx/ta3NJw2d8RtCFxgzHeRqFRr8jgyzThbu+MZ4Uw==","shasum":"90362e8a1122ce3b76f6c3157907d30182f53f54","tarball":"http://registry-npm.ywwl.com/@emmetio/css-abbreviation/download/@emmetio/css-abbreviation-2.1.4.tgz","fileCount":11,"unpackedSize":44931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV73SCRA9TVsSAnZWagAAt/oP/03PJEJTBRjlgku0em5Z\n7hEiH/IqiO/SgQStZVTrsf/RN7BJCE3SQ3tZVM0qQladxEZWvqNzxnsEgY9A\naLs5Ob5M7N4JWgC4k3kMfvLpLGQ5zPN0xwCtV8bOXzxFqENYUbJC4HZqqV+J\nyTTeZKa4e6mrQuwN9u1p/X11ae6T09g38W/eVJKqHedz53BP+wqXFhnrs4xo\nzdIroFns7KgtyScB2fHTKxxKoO7ZdQkj+Hb8oIpcLlgPyQJrdLM3abNghUvn\noysN7eRfEdGFRa7HXbfzu811FPyQInWI4MqZv3gAoaZzUop638uCbrM1GzO8\nSIV6TeAXqUHxPnzINi2bl7NNymfJKAaQhAmpisVdNLFUD/187l9HM0xHYnlL\ngoilq771ZGy+hz7qgkRu3nUo+c1Wuh9g/aWZKrMpFw4FTRW8rV2RsmEMC74j\neaG3BTX4A8Bnr5iLUUNXWhZ8+lf/Jao4XCeUy++AmSNdbxuTTgLk3ZiD2Km1\nPBnD9bvExTKVUPVftLHvhFH+v4nMDkvS8DS/Eq+Zoi6leGGdLNonHY6VdVj9\n1JKAWFDVSwYdK+z0gCmYQ3wmza1h/C+kAxgjItwTMN/ovxcOZW2kbbbAiB0U\n0jEsmCKGUoTCd9IbjWLI25VeyRXRFtHwYksby866+HTq/JxxmtIK9k2+vec2\nUz7e\r\n=eEgM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHIufpfoFEvTeyrNl94Az0kR5pG2oxoaIdjr2aGGXGWjAiEAjACrDQzv312aiwb+GkoByfGxXHuaZfn0kMS/gdIjJRM="}],"size":8417,"noattachment":false,"key":"/@emmetio/css-abbreviation/-/@emmetio/css-abbreviation-2.1.4.tgz"},"_npmUser":{"name":"serge.che","email":"serge.che@gmail.com"},"maintainers":[{"name":"emmetio-user","email":"info@emmet.io"},{"name":"serge.che","email":"serge.che@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-abbreviation_2.1.4_1616362961913_0.9872070775865684"},"_hasShrinkwrap":false,"readme":"# Emmet stylesheet abbreviation parser\n\nParses given Emmet *stylesheet* abbreviation into AST. Parsing is performed in two steps: first it tokenizes given abbreviation (useful for syntax highlighting in editors) and then tokens are analyzed and converted into AST nodes as plain, JSON-serializable objects.\n\nUnlike in [markup abbreviations](/packages/abbreviation), elements in stylesheet abbreviations cannot be nested and contain attributes, but allow embedded values in element names.\n\n## Usage\n\nYou can install it via npm:\n\n```bash\nnpm install @emmetio/css-abbreviation\n```\n\nThen add it into your project:\n\n```js\nimport parse from '@emmetio/css-abbreviation';\n\nconst props = parse('p10+poa');\n/* [{\n    name: 'p',\n    value: [{ type: 'CSSValue', value: [...] }],\n    important: false\n}, {\n    name: 'poa',\n    value: [],\n    important: false\n}] */\n```\nThe returned result is an array of `CSSProperty` items: a node with name and values.\n\n## Abbreviation syntax\n\nEmmet stylesheet abbreviation element may start with name and followed by values, optionally chained with `-` delimiter. In most cases, actual CSS properties doesn’t have numbers in their names (or at least they are not used in abbreviation shortcuts) so a number right after alpha characters is considered as *embedded value*, as well as colors starting with `#` character: `p10`, `bg#fc0` etc. If implicit name/value boundary can’t be identified, you should use `-` as value separator: `m-a`, `p10-20` etc.\n\n### Operators\n\nSince CSS properties can’t be nested, the only available operator is `+`.\n","publish_time":1616362962056,"_cnpm_publish_time":1616362962056,"dist-tags":{"latest":"2.1.8"}}