Commit 47d05713 authored by Brandon Bayer's avatar Brandon Bayer Committed by Naoyuki Kanezawa

README: add more help on using Glamor (#165)

parent c5bbff41
......@@ -58,11 +58,13 @@ That means pages never load unnecessary code!
### CSS
We use [glamor](https://github.com/threepointone/glamor) to provide a great built-in solution for CSS isolation and modularization without trading off any CSS features
We use [glamor](https://github.com/threepointone/glamor) to provide a great built-in solution for CSS isolation and modularization without trading off any CSS features.
Glamor's [HowTo](https://github.com/threepointone/glamor/blob/master/docs/howto.md) shows converting various CSS use cases to Glamor. See Glamor's [API docs](https://github.com/threepointone/glamor/blob/master/docs/api.md) for more details.
```jsx
import React from 'react'
import css from 'next/css'
import css, {insertRule} from 'next/css'
export default () => (
<div className={style}>
......@@ -70,6 +72,9 @@ export default () => (
</div>
)
// Global CSS rule
insertRule("html, body { margin: 0; padding: 0; }")
const style = css({
background: 'red',
':hover': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment