├── .babelrc ├── .eslintignore ├── .gitignore ├── lerna.json ├── packages ├── benchmarks │ ├── src │ │ ├── reactxp.js │ │ ├── glamor.js │ │ ├── emotion.js │ │ ├── aphrodite.js │ │ ├── glamorous.js │ │ ├── styletron.js │ │ ├── emotion-css.js │ │ ├── new-css-in-js.js │ │ ├── jss.js │ │ ├── emotion-obj-style.js │ │ ├── radium.js │ │ ├── styled-components.js │ │ ├── css-modules.js │ │ ├── styled-components-primitives.js │ │ ├── react-native.js │ │ ├── react-native-stylesheet.js │ │ └── components │ │ │ ├── View │ │ │ ├── styles.css │ │ │ ├── css-modules.js │ │ │ ├── emotion.js │ │ │ ├── new-css-in-js.js │ │ │ ├── styled-components.js │ │ │ ├── glamorous.js │ │ │ ├── glamor.js │ │ │ ├── emotion-css.js │ │ │ ├── emotion-obj-style.js │ │ │ ├── radium.js │ │ │ ├── aphrodite.js │ │ │ ├── jss.js │ │ │ ├── styletron.js │ │ │ └── react-native-stylesheet.js │ │ │ ├── Icons │ │ │ ├── styles.js │ │ │ ├── Reply.js │ │ │ ├── Heart.js │ │ │ ├── DirectMessage.js │ │ │ └── Retweet.js │ │ │ ├── Box │ │ │ ├── styles.css │ │ │ ├── css-modules.js │ │ │ ├── glamorous.js │ │ │ ├── styled-components-primitives.js │ │ │ ├── new-css-in-js.js │ │ │ ├── styled-components.js │ │ │ ├── glamor.js │ │ │ ├── emotion-css.js │ │ │ ├── emotion-obj-style.js │ │ │ ├── react-native.js │ │ │ ├── radium.js │ │ │ ├── aphrodite.js │ │ │ ├── react-native-stylesheet.js │ │ │ ├── jss.js │ │ │ ├── emotion.js │ │ │ ├── reactxp.js │ │ │ └── styletron.js │ │ │ ├── TweetText │ │ │ └── index.js │ │ │ ├── theme.js │ │ │ ├── AspectRatio │ │ │ └── index.js │ │ │ ├── NestedTree │ │ │ └── index.js │ │ │ ├── TweetActionsBar │ │ │ └── index.js │ │ │ ├── UserNames │ │ │ └── index.js │ │ │ ├── GridView │ │ │ └── index.js │ │ │ ├── UserAvatar │ │ │ └── index.js │ │ │ ├── TweetAction │ │ │ └── index.js │ │ │ ├── AppText │ │ │ └── index.js │ │ │ ├── TweetTextPart │ │ │ └── index.js │ │ │ └── Tweet │ │ │ └── index.js │ ├── index.html │ ├── tests │ │ ├── renderDeepTree.js │ │ ├── renderWideTree.js │ │ └── renderTweet.js │ ├── createRenderBenchmark.js │ ├── run-headless.js │ ├── package.json │ ├── webpack.config.js │ ├── benchmark.js │ ├── README.md │ └── index.js ├── preact │ └── package.json ├── server │ ├── package.json │ └── src │ │ └── index.js ├── core │ ├── package.json │ ├── src │ │ ├── hash.js │ │ ├── index.js │ │ ├── sheet.js │ │ └── stylis.js │ └── __tests__ │ │ ├── __snapshots__ │ │ └── css.js.snap │ │ └── css.js └── react │ ├── package.json │ ├── src │ └── index.js │ └── __tests__ │ ├── __snapshots__ │ └── index.js.snap │ └── index.js ├── README.md ├── .travis.yml ├── .eslintrc.js ├── LICENSE ├── rollup.config.js ├── package.json └── CODE_OF_CONDUCT.md /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "flow", "react"] 3 | } -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | coverage 3 | node_modules 4 | stylis.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | yarn.lock 4 | dist 5 | coverage 6 | *.log -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "2.0.0", 3 | "packages": [ 4 | "packages/*" 5 | ], 6 | "version": "0.0.1-5" 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/reactxp.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/reactxp' 2 | import { View } from 'reactxp' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/glamor.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/glamor' 2 | import View from './components/View/glamor' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/emotion.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/emotion' 2 | import View from './components/View/emotion' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/aphrodite.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/aphrodite' 2 | import View from './components/View/aphrodite' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/glamorous.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/glamorous' 2 | import View from './components/View/glamorous' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/styletron.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/styletron' 2 | import View from './components/View/styletron' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/emotion-css.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/emotion-css' 2 | import View from './components/View/emotion-css' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/new-css-in-js.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/new-css-in-js' 2 | import View from './components/View/new-css-in-js' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/jss.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/jss' 2 | import View from './components/View/jss' 3 | 4 | const api = { 5 | Box, 6 | View 7 | } 8 | 9 | export default api 10 | -------------------------------------------------------------------------------- /packages/benchmarks/src/emotion-obj-style.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/emotion-obj-style' 2 | import View from './components/View/emotion-obj-style' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/radium.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/radium' 2 | import View from './components/View/radium' 3 | 4 | const api = { 5 | Box, 6 | View 7 | } 8 | 9 | export default api 10 | -------------------------------------------------------------------------------- /packages/benchmarks/src/styled-components.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/styled-components' 2 | import View from './components/View/styled-components' 3 | 4 | export default { 5 | Box, 6 | View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/css-modules.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/css-modules' 2 | import View from './components/View/css-modules' 3 | 4 | const api = { 5 | Box, 6 | View 7 | } 8 | 9 | export default api 10 | -------------------------------------------------------------------------------- /packages/benchmarks/src/styled-components-primitives.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/styled-components' 2 | import styled from 'styled-components/primitives' 3 | 4 | export default { 5 | Box, 6 | View: styled.View 7 | } 8 | -------------------------------------------------------------------------------- /packages/benchmarks/src/react-native.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/react-native' 2 | import Tweet from './components/Tweet' 3 | import { View } from 'react-native' 4 | 5 | export default { 6 | Box, 7 | Tweet, 8 | View 9 | } 10 | -------------------------------------------------------------------------------- /packages/benchmarks/src/react-native-stylesheet.js: -------------------------------------------------------------------------------- 1 | import Box from './components/Box/react-native-stylesheet' 2 | import View from './components/View/react-native-stylesheet' 3 | 4 | const api = { 5 | Box, 6 | View 7 | } 8 | 9 | export default api 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # new-css-in-js 2 | 3 | 4 | 5 | ### Todo 6 | 7 | - clean falsy values 8 | - test that specificity is correct for composition and stuff 9 | - auto px 10 | - regular function calls with objects 11 | - automatically run stylis through closure compiler 12 | - composes 13 | -------------------------------------------------------------------------------- /packages/benchmarks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |b.charCodeAt(8))break;case 115:a=a.replace(b,"-webkit-"+b)+";"+a;break;case 207:case 102:a=a.replace(b,"-webkit-"+
14 | (102