DEV: Plugins can extend color definitions (#10383)

This commit is contained in:
Penar Musaraj
2020-08-06 09:46:17 -04:00
committed by GitHub
parent 6fdc711b4a
commit 87e2c9de24
8 changed files with 58 additions and 2 deletions

View File

@ -54,6 +54,7 @@ class DiscoursePluginRegistry
define_register :stylesheets, Hash
define_register :mobile_stylesheets, Hash
define_register :desktop_stylesheets, Hash
define_register :color_definition_stylesheets, Hash
define_register :sass_variables, Set
define_register :handlebars, Set
define_register :serialized_current_user_fields, Set
@ -153,6 +154,8 @@ class DiscoursePluginRegistry
elsif opts == :desktop
self.desktop_stylesheets[plugin_directory_name] ||= Set.new
self.desktop_stylesheets[plugin_directory_name] << asset
elsif opts == :color_definitions
self.color_definition_stylesheets[plugin_directory_name] = asset
elsif opts == :variables
self.sass_variables << asset
else