DEV: Refactor font and category background importers (#12312)

This commit is contained in:
Penar Musaraj
2021-03-10 11:05:56 -05:00
committed by GitHub
parent a52a863fc9
commit 4071af1d09
8 changed files with 129 additions and 118 deletions

View File

@ -24,6 +24,16 @@ module Stylesheet
path = "#{Stylesheet::Common::ASSET_ROOT}/#{filename}"
file += File.read path
case asset.to_s
when "desktop", "mobile"
file += importer.category_backgrounds
file += importer.font
when "embed", "publish"
file += importer.font
when "wizard"
file += importer.wizard_fonts
end
if asset.to_s == Stylesheet::Manager::COLOR_SCHEME_STYLESHEET
file += importer.import_color_definitions
file += importer.import_wcag_overrides