Skip to content

Commit

Permalink
Add documentation about option
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov authored and webark committed Feb 23, 2022
1 parent 170ced0 commit 1da9778
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,22 @@ ENV['ember-component-css'] = {
}
```

**patchClassicComponent**

Set this option to `false` to prevent automatic `Component.reopen()` call which injects
the autogenerated class into component's `classNames` property.

You would need to use {{this.styleNamespace}} in *all* of your templates instead:

```hbs
<div class="wrapper {{this.styleNamespace}}">
Content goes here.
</div>
```

This is required to use `ember-component-css` with Ember 4+ since `Component.reopen()` was removed from Ember.js codebase.
For more details you may refer to [deprecation page](https://deprecations.emberjs.com/v3.x#toc_ember-component-reopen).


### [The announcement from EmberConf 2015](https://youtu.be/T1zxaEKeq3E)
[![CSS is hard - EmberConf 2015](http://f.cl.ly/items/1a3a3r1C1y0D060D3j3u/EmberConf%202015%20-%20CSS%20Is%20Hard%20-%20YouTube%202015-03-22%2018-33-41.jpg)](https://youtu.be/T1zxaEKeq3E)

0 comments on commit 1da9778

Please sign in to comment.