# babel-plugin-css-in-js [![build status](https://img.shields.io/travis/martinandert/babel-plugin-css-in-js.svg?style=flat-square)](https://travis-ci.org/martinandert/babel-plugin-css-in-js) [![code climate](https://img.shields.io/codeclimate/github/martinandert/babel-plugin-css-in-js.svg?style=flat-square)](https://codeclimate.com/github/martinandert/babel-plugin-css-in-js) [![test coverage](https://img.shields.io/codeclimate/coverage/github/martinandert/babel-plugin-css-in-js.svg?style=flat-square)](https://codeclimate.com/github/martinandert/babel-plugin-css-in-js) [![npm version](https://img.shields.io/npm/v/babel-plugin-css-in-js.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-css-in-js) A plugin for Babel v6 which transforms inline styles defined in JavaScript modules into class names so they become available to, e.g. the `className` prop of React elements. While transforming, the plugin processes all JavaScript style definitions found and bundles them up into a CSS file, ready to be requested from your web server. babel-plugin-css-in-js works seamlessly on both client and server. It has built-in support for media queries, pseudo-classes, attribute selectors, and theming. The plugin's options allow you to configure vendor-prefixing, minification, and class name compression. If you're impatient, [visit the live demo](http://babel-plugin-css-in-js.andert.io/). The source code for it can be found [in the example directory](example/). ## Example In order for the plugin to work, in your components, surround each inline style specification with a module-level `cssInJS()` function call. This provides a hook for the plugin to process the first argument given to the call and then replace it with an object literal containing the resulting class names as values. **In** ```jsx