DEV: Raise exception for deprecations in core stylesheets (#31894)

This commit is contained in:
David Taylor
2025-04-16 16:36:41 +01:00
committed by GitHub
parent fec1ba0d73
commit 3d689bbbc2
2 changed files with 2 additions and 0 deletions

View File

@ -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",
)

View File

@ -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)