3

I'm migrating from node-sass to dart-sass and in my .css file I have this style:

> .wc-card .wc-list.hero > .ac-container > .ac-container {
  width: 273px;
  background-color: #fff !important;
}

When i build my react application with npm install I have this error:

Deprecation Warning: The selector "> .wc-card .wc-list.hero > .ac-container > div > div > div > button" is invalid CSS. This will be an error in Dart Sass 2.0.0.

I have this version on my package.json:

   "sass": "^1.49.9",

So my question is, how can i replace this operator? I am not a css/sass expert.

  • do you have a parent selector, which you've put before the child operator ‘>’? If not, try to specify it or remove the first ‘>’ — does it work this way? – keymasterr Nov 03 '22 at 15:53
  • yes indeed! The problem was a parent selector has a > and a & so compiled to css becomes like i writed in the question. – headlessdoll Nov 10 '22 at 13:20

0 Answers0