{"_id":"rcss","_rev":"3276160","name":"rcss","description":"Turn your JavaScript objects into CSS classes.","dist-tags":{"latest":"0.1.5"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"},{"name":"crmarsh","email":""},{"name":"raynos","email":""}],"time":{"modified":"2024-03-21T10:27:24.000Z","created":"2013-11-14T03:33:54.018Z","0.1.5":"2015-02-22T22:41:09.859Z","0.1.4":"2014-10-02T01:07:09.648Z","0.1.3":"2014-07-30T23:23:22.727Z","0.1.2":"2014-07-30T23:21:12.543Z","0.1.1":"2014-07-30T23:17:33.824Z","0.1.0":"2014-07-06T01:19:41.386Z","0.0.0":"2013-11-14T03:33:54.018Z"},"users":{},"author":{"name":"chenglou"},"repository":{"type":"git","url":"https://github.com/chenglou/RCSS.git"},"versions":{"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":"crmarsh","email":""},{"name":"raynos","email":""}],"dist":{"shasum":"ea19cb45a401e3afba6a7c364046c3fb1c478df5","size":3856,"noattachment":false,"key":"/rcss/-/rcss-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.1.5.tgz"},"publish_time":1424644869859,"_hasShrinkwrap":false,"_cnpm_publish_time":1424644869859,"_cnpmcore_publish_time":"2021-12-16T11:26:57.285Z"},"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":"crmarsh","email":""},{"name":"raynos","email":""}],"dist":{"shasum":"cf2a8027907b0b1a8bcb8bb19aed9dbb83d8efe0","size":3851,"noattachment":false,"key":"/rcss/-/rcss-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.1.4.tgz"},"publish_time":1412212029648,"_hasShrinkwrap":false,"_cnpm_publish_time":1412212029648,"_cnpmcore_publish_time":"2021-12-16T11:26:57.532Z"},"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"},{"name":"crmarsh","email":""},{"name":"raynos","email":""}],"dist":{"shasum":"a5d02522f7b6d311c84bad10f1171cb71ccfb5d3","size":4984,"noattachment":false,"key":"/rcss/-/rcss-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.1.3.tgz"},"publish_time":1406762602727,"_hasShrinkwrap":false,"_cnpm_publish_time":1406762602727,"_cnpmcore_publish_time":"2021-12-16T11:26:57.732Z"},"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"},{"name":"crmarsh","email":""},{"name":"raynos","email":""}],"dist":{"shasum":"b4416a98a7245f2ebe5bf75c8441d2f6986e512d","size":5014,"noattachment":false,"key":"/rcss/-/rcss-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.1.2.tgz"},"publish_time":1406762472543,"_hasShrinkwrap":false,"_cnpm_publish_time":1406762472543,"_cnpmcore_publish_time":"2021-12-16T11:26:57.988Z"},"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"},{"name":"crmarsh","email":""},{"name":"raynos","email":""}],"dist":{"shasum":"0b992357fb55ef165d6e78e9ec9b6dcfe61b6432","size":9319,"noattachment":false,"key":"/rcss/-/rcss-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.1.1.tgz"},"publish_time":1406762253824,"_hasShrinkwrap":false,"_cnpm_publish_time":1406762253824,"_cnpmcore_publish_time":"2021-12-16T11:26:58.367Z"},"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"},{"name":"crmarsh","email":""},{"name":"raynos","email":""}],"dist":{"shasum":"8203250f27fb648c5fb23c49e932e019b7a8bb72","size":8375,"noattachment":false,"key":"/rcss/-/rcss-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.1.0.tgz"},"publish_time":1404609581386,"_hasShrinkwrap":false,"_cnpm_publish_time":1404609581386,"_cnpmcore_publish_time":"2021-12-16T11:26:58.577Z"},"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"},"readmeFilename":"README.md","_id":"rcss@0.0.0","dist":{"shasum":"125eef5e17a8f68cff0385d56d23054b4d8bc257","size":1427192,"noattachment":false,"key":"/rcss/-/rcss-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rcss/download/rcss-0.0.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"chenglou","email":"chenglou92@gmail.com"},"maintainers":[{"name":"chenglou","email":"chenglou92@gmail.com"},{"name":"crmarsh","email":""},{"name":"raynos","email":""}],"publish_time":1384400034018,"_hasShrinkwrap":false,"_cnpm_publish_time":1384400034018,"_cnpmcore_publish_time":"2021-12-16T11:27:01.829Z"}},"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","_attachments":{},"homepage":"https://github.com/chenglou/RCSS","bugs":{"url":"https://github.com/chenglou/RCSS/issues"},"license":"MIT"}