0

I am trying to upgrade my angular version to 13 and after updating the version I am getting the below error in the sass files.

This is my sample code

@if $enable-light-style {
  .light-style {
    @import "../_appwork/include";

    $ui-star-empty-color: $gray-200;
    $ui-icon-border-color: $gray-100;
}

But I am getting the below error.

SassError: This at-rule is not allowed here.
    ╷
396 │     @import "../_appwork/include";

Could anyone help to resolve this problem?

Thanks in advance

az rnd
  • 643
  • 3
  • 14
  • 28
  • You can't use `@import` inside control directives (`@for`, `@if`, `@each`), mixins or functions. Move the `@import` out of the `@if` directive. – tao Nov 30 '22 at 16:05
  • 1
    As a workaround, consider [this approach](https://stackoverflow.com/a/13879344/1891677). – tao Nov 30 '22 at 16:08

0 Answers0