Skip to content

Commit 5f4dc5c

Browse files
committed
feat: work on hydration
1 parent 9de1af8 commit 5f4dc5c

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

addon/hydrate.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ exports.addon = function (renderer, id) {
2121

2222
var cssRules = stylesheet.cssRules;
2323

24-
for (var i = 0; i < cssRules.length; i++) {
25-
var rule = cssRules[i];
26-
hydrated[rule.selectorText] = 1;
27-
}
24+
for (var i = 0; i < cssRules.length; i++)
25+
hydrated[cssRules[i].selectorText] = 1;
2826

2927
var put = renderer.put;
3028

docs/hydrate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ html += `<style id="nano-css">${nano.raw}</style>`;
77
```
88

99
That's it! `hydrate` addon will find this stylesheet in the browser and will not emit CSS
10-
rules that are already there.
10+
rules that were already generated by the server.
1111

1212

1313
## Installation

docs/rule.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ and semantic reasons.
3333
const className = rule(css, 'RedText');
3434
```
3535

36-
---
37-
3836
> __P.S.__
3937
>
4038
> If you specify all style names explicitly, you don't need to install `stable` addon.

docs/style.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const Button = style(ButtonWhitelist, {
9090
// ...
9191
});
9292

93-
<Button title="Click it!" onClick={}>Click me!</Button>
93+
<Button primary small title="Click it!" onClick={}>Click me!</Button>
9494
```
9595
9696
@@ -106,7 +106,7 @@ const Button = style(ButtonBlacklist, {
106106
// ...
107107
});
108108

109-
<Button title="Click it!" onClick={}>Click me!</Button>
109+
<Button primary small title="Click it!" onClick={}>Click me!</Button>
110110
```
111111
112112

0 commit comments

Comments
 (0)