Skip to content

Commit

Permalink
add specifictyPrefix option to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robinweser committed Oct 2, 2020
1 parent 0d20323 commit 37b41aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ If you're searching for older logs, please check the [old changelog](https://git

## 11.0

### 11.4.0
| Package | Changes |
| --- | --- |
| fela-plugin-theme-value | ([#812](https://github.com/robinweser/fela/pull/812)) Introducing a new plugin to access theme values directly |
| fela-plugin-pseudo-prefixer<br>fela-plugin-fullscreen-prefixer | ([#814](https://github.com/robinweser/fela/pull/814)) Introducing 2 new plugins: a general pseudo prefixer and a specific `::fullscreen` prefixer built on top of that |
| fela<br>fela-dom | ([#813](https://github.com/robinweser/fela/pull/813)) Added a new renderer config option called `specificityPrefix` that allows to prefix generated selectors with a global prefix |
| fela-dom | ([#811](https://github.com/robinweser/fela/pull/811)) Renamed UMD output to `FelaDOM` to match previous versions |

### 11.3.2

| Package | Changes |
Expand Down
6 changes: 4 additions & 2 deletions docs/advanced/RendererConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ We might introduce more configuration options with future releases, so be sure t
| mediaQueryOrder | *(Array?)* | | An explicit order in which `@media` queries are rendered |
| sortMediaQuery | *Function* | | A function with the same signature as sort functions in e.g. `Array.prototype.sort` for dynamically sorting media queries. Maps over an array of media query strings. Overwrites `mediaQueryOrder`. |
| selectorPrefix | *(string?)* | | Prepend a static prefix to every generated class and keyframe. It must only consist of `a-zA-Z0-9-_` and start with `a-zA-Z_`. |
| specificityPrefix | *(string?)* | | Prepend a static prefix to every CSS selector. It must only consist of `a-zA-Z0-9-_` and start with `a-zA-Z_`. |
| styleNodeAttributes | *(Object?)* | | A map of attributes that's passed to the generated style nodes. |
| filterClassName | *(Function?)* | `cls => cls.indexOf('ad') !== -1` | Filter-function to filter used class names |
| devMode | *(Boolean?)* | `false` | Enabling development mode for better developer experience. **Make sure to disable devMode in production.** |
Expand All @@ -40,6 +41,7 @@ const config = {
'(min-height: 500px)'
],
selectorPrefix: 'fela_',
specificityPrefix: ".App ",
styleNodeAttributes: {
nonce: "XXX"
},
Expand Down Expand Up @@ -101,11 +103,11 @@ console.log(renderToString(renderer))
}
}

.fela_a {
.App .fela_a {
color: red
}

.fela_b {
.App .fela_b {
font-size: 12px
}
```
Expand Down

0 comments on commit 37b41aa

Please sign in to comment.