From 47d057134185c5a60d5690c94e339e5f5bcace8b Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Mon, 31 Oct 2016 02:32:51 -0500 Subject: [PATCH] README: add more help on using Glamor (#165) --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 270a6d33..839399cd 100644 --- a/README.md +++ b/README.md @@ -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 () => (
@@ -70,6 +72,9 @@ export default () => (
) +// Global CSS rule +insertRule("html, body { margin: 0; padding: 0; }") + const style = css({ background: 'red', ':hover': {