mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Plugins can extend color definitions (#10383)
This commit is contained in:
@@ -115,6 +115,17 @@ module Stylesheet
|
||||
|
||||
register_imports!
|
||||
|
||||
def self.import_color_definitions
|
||||
return "" unless DiscoursePluginRegistry.color_definition_stylesheets.length
|
||||
contents = +""
|
||||
DiscoursePluginRegistry.color_definition_stylesheets.each do |name, path|
|
||||
contents << "// Color definitions from #{name}\n\n"
|
||||
contents << File.read(path.to_s)
|
||||
contents << "\n\n"
|
||||
end
|
||||
contents
|
||||
end
|
||||
|
||||
def initialize(options)
|
||||
@theme = options[:theme]
|
||||
@theme_id = options[:theme_id]
|
||||
|
||||
Reference in New Issue
Block a user