0

我正在尝试在 Ruby on Rails 应用程序中升级引导程序版本。从使用纱线迁移4.0.0-alpha.64.1使用纱线后,我在运行时收到此错误rails assets:precompile

错误

SassC::SyntaxError: Error: Undefined variable: "$alert-warning-bg".
        on line 32:20 of app/assets/stylesheets/variables/_helpers.scss
        from line 47:9 of app/assets/stylesheets/variables.scss
        from line 9:9 of app/assets/stylesheets/application.scss
        from line 1:9 of app/assets/stylesheets/admin.scss
>>   outline: lighten($alert-warning-bg, 9%);

助手.scss

.highlight {
  outline: lighten($alert-warning-bg, 9%);
}
4

1 回答 1

1

$alert-warning-bg被删除4.1并替换为theme-color-level($color, $alert-bg-level)mixin(使其干燥?)。用法示例:

theme-color-level('warning', $alert-bg-level)

或特别针对您的情况:

lighten(theme-color-level('warning', $alert-bg-level), 9%)
于 2021-06-17T18:02:18.423 回答