Skip to content

Commit aa5c69c

Browse files
author
Henri Beck
committed
Merge branch 'master' into bugfix/react-jss-nested-function-values
* master: Use componentDidMount for WithStyles (#1157) Use mui like global ponyfill (#1153) HOC should not attach sheets until mount (#1149) v10.0.0-alpha.22 add react-dom dev dependenncy Fix SSR for Hooks based implementation (#1148) React-JSS id prop docs and improvements (#1147) v10.0.0-alpha.21 fix changelog add support hint to the changelog (#1145) Sheets management for css() (#1137) # Conflicts: # packages/react-jss/.size-snapshot.json
2 parents 3dab41e + 808acb4 commit aa5c69c

71 files changed

Lines changed: 539 additions & 703 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

changelog.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,39 @@
11
## Next
22

3+
Since you are interested in what happens next, in case, you work for a for-profit company that benefits from using the project, please consider supporting it on https://opencollective.com/jss.
4+
5+
---
6+
7+
### Bug fixes
8+
9+
- [react-jss] withStyles shouldn't attach() on SSR ([#1149](https://github.com/cssinjs/jss/pull/1149), [#1157](https://github.com/cssinjs/jss/pull/1157))
10+
11+
### Improvements
12+
13+
- [jss] Improve treeshaking for webpack by not using `global`. ([#1153](https://github.com/cssinjs/jss/pull/1153))
14+
15+
## 10.0.0-alpha.22 (2019-7-2)
16+
17+
### Breaking Changes
18+
19+
- [jss] SheetsRegistry.toString(options) will now return all sheets by default, no matter detached or attached. You can specify which one you want by using the option `registry.toString({attached: true})` ([1140](https://github.com/cssinjs/jss/pull/1140))
20+
21+
### Bug fixes
22+
23+
- [react-jss] SSR for the hooks based API will now work with the registry as expected ([1140](https://github.com/cssinjs/jss/pull/1140))
24+
- [react-jss] When id options passed to JssProvider, we need to create a new `generateId` function ([#1147](https://github.com/cssinjs/jss/pull/1147))
25+
26+
### Improvements
27+
28+
- [react-jss] Document `id` prop for JssProvider, add "Class name generator options" to the docs. ([#1147](https://github.com/cssinjs/jss/pull/1147))
29+
- [react-jss] Use component name or displayName as a class name prefix also in production by default ([#1147](https://github.com/cssinjs/jss/pull/1147))
30+
31+
## 10.0.0-alpha.21 (2019-6-22)
32+
333
### Bug fixes
434

535
- [jss-plugin-vendor-prefixer] Upgrade css-vendor package to v2.0.5 ([#1142](https://github.com/cssinjs/jss/pull/1142))
36+
- [css-jss] Slows down in benchmark after 10k rules ([#1137](https://github.com/cssinjs/jss/pull/1137))
637

738
## 10.0.0-alpha.20 (2019-6-17)
839

docs/jss-api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,19 @@ You need to have the [jss-plugin-global](https://github.com/cssinjs/jss/tree/mas
119119
`SheetsRegistry`
120120

121121
When rendering on the server, you will need to get all rendered styles as a CSS string.
122-
The `SheetsRegistry` class allows you to **manually** aggregate and stringify them. Read [more about SSR](ssr.md).
122+
The `SheetsRegistry` class allows you to aggregate and stringify them. Read [more about SSR](ssr.md).
123+
124+
In case you are using the `SheetsRegistry` in the browser and you want to get Style Sheets which are `attached` or `detached` only, you can use the option `attached`.
123125

124126
```javascript
125127
import jss, {SheetsRegistry} from 'jss'
126128

127129
const sheets = new SheetsRegistry()
128130
const sheet = jss.createStyleSheet()
129131
sheets.add(sheet)
130-
sheets.toString() // Returns CSS of all attached Style Sheets together.
132+
sheets.toString() // Returns all Style Sheets as a CSS string.
133+
sheets.toString({attached: true}) // Returns all attached Style Sheets as a CSS string.
134+
sheets.toString({attached: false}) // Returns all detached Style Sheets as a CSS string.
131135
```
132136

133137
## Style Sheets Manager

0 commit comments

Comments
 (0)