mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:41:17 +08:00
DEV: Raise exception for deprecations in core stylesheets (#31894)
This commit is contained in:
@ -63,6 +63,7 @@ module Stylesheet
|
|||||||
source_map_contents: true,
|
source_map_contents: true,
|
||||||
load_paths: load_paths,
|
load_paths: load_paths,
|
||||||
silence_deprecations: %w[color-functions import global-builtin],
|
silence_deprecations: %w[color-functions import global-builtin],
|
||||||
|
fatal_deprecations: options[:strict_deprecations] ? %w[mixed-decls] : [],
|
||||||
quiet: ENV["QUIET_SASS_DEPRECATIONS"] == "1",
|
quiet: ENV["QUIET_SASS_DEPRECATIONS"] == "1",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ class Stylesheet::Manager::Builder
|
|||||||
color_scheme_id: @color_scheme&.id,
|
color_scheme_id: @color_scheme&.id,
|
||||||
load_paths: load_paths,
|
load_paths: load_paths,
|
||||||
dark: @dark,
|
dark: @dark,
|
||||||
|
strict_deprecations: %i[desktop mobile admin wizard].include?(@target),
|
||||||
)
|
)
|
||||||
rescue SassC::SyntaxError, SassC::NotRenderedError, DiscourseJsProcessor::TranspileError => e
|
rescue SassC::SyntaxError, SassC::NotRenderedError, DiscourseJsProcessor::TranspileError => e
|
||||||
if Stylesheet::Importer::THEME_TARGETS.include?(@target.to_s)
|
if Stylesheet::Importer::THEME_TARGETS.include?(@target.to_s)
|
||||||
|
Reference in New Issue
Block a user