{"_id":"rcss","_rev":"24-4e47200649c08ada792464adf68ecc68","name":"rcss","description":"Turn your JavaScript objects into CSS classes.","dist-tags":{"latest":"0.1.5"},"versions":{"0.0.0":{"name":"rcss","version":"0.0.0","description":"CSS as JavaScript objects, imported with `require()`.","main":"index.js","directories":{"example":"examples"},"dependencies":{"sha1":"~1.1.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"_id":"rcss@0.0.0","dist":{"shasum":"125eef5e17a8f68cff0385d56d23054b4d8bc257","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.0.0.tgz","integrity":"sha512-OgPseFDcQCbhhLJiAkzK5m2ohB83uSgsHqImx9dMabZrCRnTAYpoeE97hRFx9pv2hQYL7gN6L6Q+Kv6RcUaMQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9AmlyHkB1fxltx8bM2e9V7TU63jVy78xp39mjgTr2igIhAL0bqktUyX7F+rCHSJnop8ZPLRHq2IJklusde4H2kSKI"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"}]},"0.1.0":{"name":"rcss","version":"0.1.0","description":"Turn your JavaScript objects into CSS classes.","main":"index.js","directories":{"example":"examples"},"dependencies":{"lodash.escape":"^2.4.1","lodash.merge":"^2.4.1","valid-css-props":"0.0.2","valid-media-queries":"0.0.2"},"devDependencies":{"jest-cli":"^0.1.15"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"jest":{"unmockedModulePathPatterns":["./node_modules/*"]},"gitHead":"048798f0fd51765031ceb2a0e4b3b3593a75419c","homepage":"https://github.com/chenglou/RCSS","_id":"rcss@0.1.0","_shasum":"8203250f27fb648c5fb23c49e932e019b7a8bb72","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"}],"dist":{"shasum":"8203250f27fb648c5fb23c49e932e019b7a8bb72","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.1.0.tgz","integrity":"sha512-2LyN12aZPQUa6MW4tvS6mM6Xd+M11Xyn5EH+tqdGqJieIW7ZQJmhuFkHwnXVpl+6wwFtlxdDXAExgx+TM69xoQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGbDowCgkmTNzs0zEYf5yFBBRRBYAes44OQlHIxPoIuhAiAHe15KZo+ikUY2VuIO1Fmv/WyBR11/SOPPGMvJ7qljVw=="}]}},"0.1.1":{"name":"rcss","version":"0.1.1","description":"Turn your JavaScript objects into CSS classes.","main":"index.js","directories":{"example":"examples"},"dependencies":{"lodash.escape":"^2.4.1","lodash.merge":"^2.4.1","valid-css-props":"0.0.2","valid-media-queries":"0.0.2"},"devDependencies":{"jest-cli":"^0.1.15"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"jest":{"unmockedModulePathPatterns":["./node_modules/*"]},"gitHead":"2598cebdac0cd73cd8208f53ae65e7ff93a8d828","homepage":"https://github.com/chenglou/RCSS","_id":"rcss@0.1.1","_shasum":"0b992357fb55ef165d6e78e9ec9b6dcfe61b6432","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"}],"dist":{"shasum":"0b992357fb55ef165d6e78e9ec9b6dcfe61b6432","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.1.1.tgz","integrity":"sha512-j0YLAQ/uThRi0I1f9pNs1Fcy/LEtyfHq66AfXwcs/PLkLH4ZTpTNC0Cv2Fnylqkpou3iGq/iZlDSmRJgIA+q8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+7oZvAJOR2s0ZtBtOJ/+qphK8lgbyWllcy9OjXwJyvAiB9JxQpuQkLvv4iyCp2OVGZwqyV3QYS0TfptVEC0HhZRQ=="}]}},"0.1.2":{"name":"rcss","version":"0.1.2","description":"Turn your JavaScript objects into CSS classes.","main":"index.js","directories":{"example":"examples"},"dependencies":{"lodash.escape":"^2.4.1","lodash.merge":"^2.4.1","valid-css-props":"0.0.2","valid-media-queries":"0.0.2"},"devDependencies":{"jest-cli":"^0.1.15"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"jest":{"unmockedModulePathPatterns":["./node_modules/*"]},"gitHead":"c816ee286e5f6ca47e936aebc4dcafbf74ecda40","homepage":"https://github.com/chenglou/RCSS","_id":"rcss@0.1.2","_shasum":"b4416a98a7245f2ebe5bf75c8441d2f6986e512d","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"}],"dist":{"shasum":"b4416a98a7245f2ebe5bf75c8441d2f6986e512d","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.1.2.tgz","integrity":"sha512-iY/7WOJD7Rm4eETKygbM/S1872BNRAsaAet35C4QsH9pzi0Oj3z2VxDu4kyLGK6IpzhANThl/aYK1CBa2tseJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBr3ivNW36ayPeHJVTs8u2Rs3ncY9B1LSgkAo7CbqGt5AiEA7/VkCC0tQ29clt/l+ExpWTHDn3i1QK0bMU4ff7TzTBw="}]}},"0.1.3":{"name":"rcss","version":"0.1.3","description":"Turn your JavaScript objects into CSS classes.","main":"index.js","directories":{"example":"examples"},"dependencies":{"lodash.escape":"^2.4.1","lodash.merge":"^2.4.1","valid-css-props":"0.0.2","valid-media-queries":"0.0.2"},"devDependencies":{"jest-cli":"^0.1.15"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"jest":{"unmockedModulePathPatterns":["./node_modules/*"]},"gitHead":"167c02baebbc66ca95f4434af4955faf9742b945","homepage":"https://github.com/chenglou/RCSS","_id":"rcss@0.1.3","_shasum":"a5d02522f7b6d311c84bad10f1171cb71ccfb5d3","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"}],"dist":{"shasum":"a5d02522f7b6d311c84bad10f1171cb71ccfb5d3","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.1.3.tgz","integrity":"sha512-XfeuyzHjjXZRao3WBzD4U24GdtlLKy/U8ZVjaiMTf69uP1NCpedGmxtQG8t/IKOcYtHcMVtooLamk7HUX2XzRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcai7IlpTTVIY82glxF61Ob66exCgBoYPE8ZI/tZRz+gIhAIKqsA6yNMohVhgqAgGerZUK9K8OlEj6VG+3vLtT4Ze3"}]}},"0.1.4":{"name":"rcss","version":"0.1.4","description":"Turn your JavaScript objects into CSS classes.","main":"index.js","directories":{"example":"examples"},"dependencies":{"sha1":"^1.1.0","deep-extend":"^0.2.11","escape-html":"^1.0.1","valid-css-props":"0.0.2","valid-media-queries":"0.0.3"},"devDependencies":{"jest-cli":"^0.1.15"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"jest":{"unmockedModulePathPatterns":["./node_modules/*"]},"gitHead":"bf100049411e2cb77180c5e07435f564fdebc0ef","homepage":"https://github.com/chenglou/RCSS","_id":"rcss@0.1.4","_shasum":"cf2a8027907b0b1a8bcb8bb19aed9dbb83d8efe0","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"crmarsh","email":"crmarsh416@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"},{"name":"raynos","email":"raynos2@gmail.com"},{"name":"crmarsh","email":"crmarsh416@gmail.com"}],"dist":{"shasum":"cf2a8027907b0b1a8bcb8bb19aed9dbb83d8efe0","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.1.4.tgz","integrity":"sha512-TSiWidb4DjaTeCnvaE9nzN0BbkVOfQL0mektW7ANTg/CKxY3fmf2oratmajr705UBmFb6uu0xn3Hj6mjRnt8Fg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTlb4bkd208UrPVZQBTS0fsRLtNXyCVD5ayQQmqrgGGwIhAOa4tAbH3k46fsLXQo0+9/5eBN6lN2Xyl0NPUXut2O+D"}]}},"0.1.5":{"name":"rcss","version":"0.1.5","description":"Turn your JavaScript objects into CSS classes.","main":"index.js","directories":{"example":"examples"},"dependencies":{"sha1":"^1.1.0","deep-extend":"^0.2.11","escape-html":"^1.0.1","valid-css-props":"0.0.5","valid-media-queries":"0.0.3"},"devDependencies":{"jest-cli":"^0.1.15"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"keywords":["css","preprocessor","json","react","rcss","style"],"author":{"name":"chenglou"},"license":"MIT","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"jest":{"unmockedModulePathPatterns":["./node_modules/*"]},"gitHead":"45bc96aa3c59e6a8b14a506895af737dbb9fbe81","homepage":"https://github.com/chenglou/RCSS","_id":"rcss@0.1.5","_shasum":"ea19cb45a401e3afba6a7c364046c3fb1c478df5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"},{"name":"raynos","email":"raynos2@gmail.com"},{"name":"crmarsh","email":"crmarsh416@gmail.com"}],"dist":{"shasum":"ea19cb45a401e3afba6a7c364046c3fb1c478df5","tarball":"https://registry.npmjs.org/rcss/-/rcss-0.1.5.tgz","integrity":"sha512-UvvyhLmcUWeELPiRpQQZPJEBQK/a5jYwDx72pbC0IG/zMQuJz4GtQeBxfB9i7Z4uYQKVKRCf8th5vZ0qkAoltw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbOcHW12CfCCG8KoJsiIIjEFH2ajz1gK4QUN/XLVYFMAiArXP7RHkU8kxFR22vbrSf3oJ26rGdRdY20gzZ2bTzl+Q=="}]}}},"readme":"# RCSS\n\nTurn your JavaScript objects into CSS classes.\n\nDesigned with [React](http://facebook.github.io/react/) and [Browserify](http://browserify.org) in mind.\n\n```bash\nnpm install rcss\n```\n\nDemo of the example folder output [here](https://rawgit.com/chenglou/RCSS/master/examples/index.html). No CSS files involved.\n\n## Overview\n\nbutton.js:\n```js\nvar RCSS = require('RCSS');\n\nvar button = {\n  display: 'inline-block',\n  padding: '6px 12px',\n  // CamelCased. Transformed back into the dashed CSS counterparts on-the-fly.\n  marginBottom: '0',\n  ':hover': {\n    color: 'blue'\n  }\n};\n\nmodule.exports = RCSS.registerClass(button);\n```\n\nindex.js\n```html\n/** @jsx React.DOM */\n\nvar React = require('React');\nvar RCSS = require('RCSS');\n\nvar button = require('./button');\n\nRCSS.injectAll();\n\nReact.renderComponent(\n  <button className={button.className}>Hello!</button>,\n  document.body\n);\n```\n\nEasy =).\n\n## API\n\n### RCSS.registerClass(styleObject)\nWrap the style declaration and register it internally. Returns a new object of the format: `{className: 'uniqueClassName', style: originalStyleObj}`. You can then use to the opaque className and the style object however you want.\n\n### RCSS.injectAll()\nA top-level call that parses all the registered style objects into real CSS, puts the result in a style tag, and injects it in the document `head`. This clears the styles registry.\n\n### RCSS.cascade(styleObj1, styleObj2, ...)\nA simple merge utility that returns a new object. Typically used [this way](https://github.com/chenglou/RCSS/blob/master/examples/primaryButton.js#L6).\n\n### RCSS.getStylesString()\nFor server-side rendering, you'd want the big style string instead of calling `injectAll()`. In fact, `injectAll()` is nothing but a helper that takes the output of `getStylesString`, creates a tag and fill the content, and puts it in `head`.\n\n## Motivations\n\n- Client-side asset bundling is complicated. RCSS piggy rides on whatever `require` implementation you use ([Browserify](http://browserify.org), [Webpack](http://webpack.github.io), etc.), so there's no extra compilation step.\n- Use the full power of a programming language with CSS.\n- No CSS preprocessor needed. There is no domain-specific language to learn, since you're constructing your JavaScript objects in... well, JavaScript.\n- CSS namespacing for free.\n- Cascading for free through simple object merges.\n- Validates your CSS properties.\n- ... And more to come. Just imagine what you can do to normal objects.\n\n## License\nMIT.\n","maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"},{"name":"raynos","email":"raynos2@gmail.com"},{"name":"crmarsh","email":"crmarsh416@gmail.com"}],"time":{"modified":"2022-06-25T14:52:25.703Z","created":"2013-11-14T03:32:24.701Z","0.0.0":"2013-11-14T03:33:54.018Z","0.0.1":"2013-11-14T03:45:05.248Z","0.1.0":"2014-07-06T01:19:41.386Z","0.1.1":"2014-07-30T23:17:33.824Z","0.1.2":"2014-07-30T23:21:12.543Z","0.1.3":"2014-07-30T23:23:22.727Z","0.1.4":"2014-10-02T01:07:09.648Z","0.1.5":"2015-02-22T22:41:09.859Z"},"author":{"name":"chenglou"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"users":{"maxogden":true,"nichoth":true},"keywords":["css","preprocessor","json","react","rcss","style"],"bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/chenglou/RCSS"}