{"name":"glamor","version":"3.0.0-3","description":"inline css for component systems","main":"lib/index.js","module":"es6/index.js","typings":"lib/src/index.d.ts","files":["es6","lib","umd","index.d.ts"],"scripts":{"example":"lerna exec --scope glamor-example npm run start","clean":"rimraf lib umd","generate-prefixer-data":"node scripts/generate-prefixer-data","build":"npm run clean clean && tsc --project tsconfig.json -m es6 --outDir es6 && webpack --config ../../webpack/ts/lib.js && webpack --config ../../webpack/ts/umd.js","build:test":"webpack --config ../../webpack/ts/tests.js","size":"cat umd/index.min.js | gzip | wc -c","test":"npm run build:test && karma start ../../karma.conf.ts.js","test:watch":"npm test -- --no-single-run","prepublish":"npm run build"},"author":{"name":"Sunil Pai","email":"threepointone@gmail.com"},"homepage":"https://github.com/threepointone/glamor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/threepointone/glamor.git"},"keywords":["css","inline"],"dependencies":{"fbjs":"^0.8.12","inline-style-prefixer":"^3.0.3","react-css-property-operations":"^15.4.1"},"devDependencies":{"@types/expect":"^1.20.1","@types/mocha":"^2.2.41","@types/node":"^7.0.18","babel-core":"^6.24.1","babel-loader":"^7.0.0","babel-polyfill":"^6.23.0","caniuse-api":"^2.0.0","cross-env":"^4.0.0","expect":"^1.20.2","expect-jsx":"^2.6.0","karma":"^1.7.0","karma-browserstack-launcher":"^1.1.1","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.3.0","karma-mocha-reporter":"^2.2.1","karma-phantomjs-launcher":"^1.0.2","karma-safari-launcher":"^1.0.0","karma-webpack":"^1.8.1","lerna":"^2.0.0-rc.5","mkdirp":"^0.5.1","mocha":"^3.3.0","react":"^15.4.2","react-dom":"^15.4.2","rimraf":"^2.6.1","ts-loader":"^2.0.3","typescript":"^2.3.2","webpack":"^2.5.1","webpack-dev-server":"^2.4.5","webpack-fix-default-import-plugin":"^1.0.3"},"bugs":{"url":"https://github.com/threepointone/glamor/issues"},"_id":"glamor@3.0.0-3","_npmVersion":"5.2.0","_nodeVersion":"6.9.1","_npmUser":{"name":"donaldpipowitch","email":"pipo@senaeh.de"},"dist":{"integrity":"sha512-Htc0fiO3tYpPNSrgIR51ueCIX8gN41nU+Jdz40HwWvEPsny5ccRCVruvlrTNjwK4N3T9TkDmxjFdvvr11KRxjg==","shasum":"62e1cf2ce70a4db0b247a5f95d4b7d6a89ac83c9","tarball":"http://registry-npm.ywwl.com/glamor/download/glamor-3.0.0-3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICR0/qI3OyLLYk+R5aPsMZXpzmwv2oSDfmssnkjblIhQAiBa6AbDjAT0iYkRZ4S9bf9w2fF8JkeHeeKvNAwtzt9zzQ=="}],"size":86245,"noattachment":false,"key":"/glamor/-/glamor-3.0.0-3.tgz"},"maintainers":[{"name":"donaldpipowitch","email":"pipo@senaeh.de"},{"name":"otbe","email":"benjamin.otto@style-systems.de"},{"name":"threepointone","email":"threepointone@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glamor-3.0.0-3.tgz_1499767212060_0.5397409829311073"},"directories":{},"deprecated":"abandoned, please use v2 instead","readme":"# glamor\n\n[![Join the chat at https://gitter.im/glamor-css/Lobby](https://badges.gitter.im/glamor-css/Lobby.svg)](https://gitter.im/glamor-css/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n![build status](https://travis-ci.org/threepointone/glamor.svg)\n\ncss in your javascript\n\n`npm install glamor --save`\n\nusage\n```jsx\nimport { css } from 'glamor'\n\n// make css rules\nlet rule = css({\n  color: 'red',\n  ':hover': {\n    color: 'pink'\n  },\n  '@media(min-width: 300px)': {\n    color: 'green',\n    ':hover': {\n      color: 'yellow'\n    }\n  }\n})\n\n// add as data attributes\n<div {...rule} {...another}>\n  zomg\n</div>\n\n// or as classes\n<div className={`${rule} ${another}`}>\n  zomg\n</div>\n\n// merge rules for great justice\nlet mono = css({\n  fontFamily: 'monospace'\n})\n\nlet bolder = css({\n  fontWeight: 'bolder'\n})\n\n<div {...css(mono, bolder)}>\n  bold code!\n</div>\n\n```\n\nmotivation\n---\n\nThis expands on ideas from @vjeux's [2014 css-in-js talk](https://speakerdeck.com/vjeux/react-css-in-js).\nWe introduce an api to annotate arbitrary dom nodes with style definitions (\"rules\") for, um, the greater good.\n\nfeatures\n---\n\n- fast / efficient, with a fluent api\n- framework independent\n- adds vendor prefixes / fallback values\n- supports all the pseudo :classes/::elements\n- `@media` queries\n- `@supports` statements\n- `@font-face` / `@keyframes`\n- escape hatches for parent / child / contextual selectors\n- dev helper to simulate pseudo classes like `:hover`, etc\n- server side / static rendering\n- tests / coverage\n- experimental - [write real css](https://github.com/threepointone/glamor/blob/master/docs/css.md), with syntax highlighting and linting\n\n\n(thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to run our build in real browsers.)\n\ndocs\n---\n- [api documentation](https://github.com/threepointone/glamor/blob/master/docs/api.md)\n- [howto](https://github.com/threepointone/glamor/blob/master/docs/howto.md) - a comparison of css techniques in glamor\n- [plugins](https://github.com/threepointone/glamor/blob/master/docs/plugins.md)\n- [server side rendering](https://github.com/threepointone/glamor/blob/master/docs/server.md)\n- [performance tips](https://github.com/threepointone/glamor/blob/master/docs/performance.md)\n- [what happens when I call css(...rules)?](https://github.com/threepointone/glamor/blob/master/docs/implementation.md)\n\nextras\n---\n\n- `glamor/reset` - include a css reset\n- [use a `css` prop on *all* your react elements](https://github.com/threepointone/glamor/blob/master/docs/createElement.md)\n- `glamor/react` - helpers for [themes](https://github.com/threepointone/glamor/blob/master/docs/themes.md), [`@vars`](https://github.com/threepointone/glamor/blob/master/docs/vars.md)\n- `glamor/jsxstyle` - [react integration](https://github.com/threepointone/glamor/blob/master/docs/jsxstyle.md), à la [jsxstyle](https://github.com/petehunt/jsxstyle/)\n- `glamor/aphrodite` - [shim](https://github.com/threepointone/glamor/blob/master/docs/aphrodite.md) for [aphrodite](https://github.com/Khan/aphrodite) stylesheets\n- `glamor/utils` - a port of [postcss-utilities](https://github.com/ismamz/postcss-utilities)\n- `glamor/ous` - a port of [the skeleton css framework](http://getskeleton.com)\n- [`glamor/styled`](https://github.com/threepointone/glamor/blob/master/docs/styled.md) - an experimental port of [styled-components](https://styled-components.com/)\n\n\nspeedy mode\n---\n\nthere are two methods by which the library adds styles to the document -\n- by appending css 'rules' to a browser backed stylesheet. This is really fast, but has the disadvantage of making the styles uneditable in the devtools sidebar.\n- by appending text nodes to a style tag. This is fairly slow, but doesn't have the editing drawback.\n\nas a compromise, we enable the former 'speedy' mode `NODE_ENV=production`, and disable it otherwise. You can manually toggle this with the `speedy()` function.\n\ncharacteristics\n---\n\nwhile glamor shares most common attributes of other inline style / css-in-js systems,\nhere are some key differences -\n\n- uses 'real' stylesheets, so you can use all css features.\n- rules can be used as data-attributes or classNames.\n- simulate pseudo-classes with the `simulate` helper. very useful, especially when combined when hot-loading and/or editing directly in devtools.\n- really fast, by way of deduping rules, and using [insertRule](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule) in production.\n\n\ntodo\n---\n\n- redo all the docs\n- [planned enhancements](https://github.com/threepointone/glamor/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement)\n- notes on composition\n\nprofit, profit\n---\n\nI get it\n","publish_time":1499767213204,"_cnpm_publish_time":1499767213204,"dist-tags":{"latest":"2.20.40"}}