CSS in MDX
Branch: master
Clone or download
Developerayo and SaraVieira Update Readme.md (#2)
Added a closing semicolon which was missing on line 67 🚀
Latest commit 8421db7 Feb 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.babelrc start Feb 4, 2019
.gitignore start Feb 4, 2019
.prettierrc start Feb 4, 2019
License.md start Feb 4, 2019
Readme.md Update Readme.md (#2) Feb 5, 2019
index.js start Feb 4, 2019
package.json start Feb 4, 2019
yarn.lock start Feb 4, 2019

Readme.md

mdx-cssx

https://cssx.netlify.com

CSSX is CSS in MDX files.

Why?

Why not?

Usage

yarn add mdx-cssx
npm i mdx-cssx
import ReactDOM from "react-dom"
import React from "react"
import App from "./App"
import CSSX from "mdx-cssx"

ReactDOM.render(
  <CSSX>
    <App />
  </CSSX>,
  document.getElementById("root")
)

Under the hood I use the mdx-provider so you can pass more components to it if you wish to override more

Then use it in your MDX files like so:

# CSSX

CSSX is CSS in MDX

it uses emotion under the hood to create the styles.

## Why?

Why not?

```cssx
body {
    background: #d9d9d9;
    padding: 20px;
    justify-content: center;
    display: flex;
    height: 100vh;
    align-items: center;
    text-align: center;
}

h1 {
  color: blue;
}

pre {
  text-align: left;
}

...

License

MIT License, see the included License.md file.