DEV: Compile core and plugin stylesheets independently of themes (#13638)

Take 2 of https://github.com/discourse/discourse/pull/13466. 

Fixes a few issues with the original PR: 

- color definition stylesheet target now includes the theme id, to avoid themes set to use the default color scheme loading the same stylesheet 
- changes the internal cache key for color definition stylesheet to reset the pre-existing cache
This commit is contained in:
Penar Musaraj
2021-07-06 13:11:10 -04:00
committed by GitHub
parent da03a3f5d6
commit 95b5794331
10 changed files with 167 additions and 169 deletions

View File

@@ -27,7 +27,7 @@ DiscourseEvent.on(:site_setting_changed) do |name, old_value, new_value|
end
end
Stylesheet::Manager.clear_core_cache!(["desktop", "mobile"]) if [:base_font, :heading_font].include?(name)
Stylesheet::Manager.clear_color_scheme_cache! if [:base_font, :heading_font].include?(name)
Report.clear_cache(:storage_stats) if [:backup_location, :s3_backup_bucket].include?(name)