ember-component-css icon indicating copy to clipboard operation
ember-component-css copied to clipboard

Upgrading Ember breaks namespaces?

Open BlueRaja opened this issue 5 years ago • 3 comments

We're attempting to upgrade from Ember 2.18 to Ember 3.16. Most things are working, but our CSS is borked. The problem seems to be that ember-component-css is injecting namespace classes in the CSS, but not in the actual DOM.

We're still using the old syntax for most things, including

export default Component.extend({
  ...
});

Could this be the cause?

Workaround:

In environment.js, add

const ENV = {
  ...
  'ember-component-css': {
    namespacing: false,
  },
}

then everywhere you are using &{ ... } in the root of your SCSS needs to be replaced with a manually-created root class

BlueRaja avatar Jun 22 '20 22:06 BlueRaja

Yes. This stopped working around ember 3.15 :/ I'm sorry. I have spent part of the week finally making some final progress on a solutions and should have soon.

Sorry for the broken functionality and the frustration I'm sure it has caused :(

webark avatar Jul 11 '20 05:07 webark

Is this still an issue? I need the styleNamespace for working with D3

derekwsgray avatar Nov 28 '22 17:11 derekwsgray

I have not been working on ember for several years. There was rewrite that I did of this "ember-cli-styles", but I am not commuting to maintaining that ☹️ There has been some success with people using it however. If there are changes you discover, or improvements you want to make, I can review the PRs for either.

webark avatar Dec 03 '22 04:12 webark