diff --git a/lib/stylesheet/compiler.rb b/lib/stylesheet/compiler.rb index 003410e8032..146fa34c82d 100644 --- a/lib/stylesheet/compiler.rb +++ b/lib/stylesheet/compiler.rb @@ -63,6 +63,7 @@ module Stylesheet source_map_contents: true, load_paths: load_paths, silence_deprecations: %w[color-functions import global-builtin], + fatal_deprecations: options[:strict_deprecations] ? %w[mixed-decls] : [], quiet: ENV["QUIET_SASS_DEPRECATIONS"] == "1", ) diff --git a/lib/stylesheet/manager/builder.rb b/lib/stylesheet/manager/builder.rb index ce778b68187..aaf0a256168 100644 --- a/lib/stylesheet/manager/builder.rb +++ b/lib/stylesheet/manager/builder.rb @@ -48,6 +48,7 @@ class Stylesheet::Manager::Builder color_scheme_id: @color_scheme&.id, load_paths: load_paths, dark: @dark, + strict_deprecations: %i[desktop mobile admin wizard].include?(@target), ) rescue SassC::SyntaxError, SassC::NotRenderedError, DiscourseJsProcessor::TranspileError => e if Stylesheet::Importer::THEME_TARGETS.include?(@target.to_s)