2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Revert "DEV: Use separate files for theme component stylesheets (#12214)" (#12224)

This reverts commit f57a49c2f9.

This had some unexpected side effects, needs some more work.
This commit is contained in:
Penar Musaraj 2021-02-26 08:20:39 -05:00 committed by GitHub
parent 4b0496b2fc
commit e74bdfdf8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 41 deletions

View file

@ -194,13 +194,18 @@ module Stylesheet
fields.map do |field|
value = field.value
if value.present?
filename = "theme_#{field.theme.id}/#{field.target_name}-#{field.name}-#{field.theme.name.parameterize}.scss"
contents << <<~COMMENT
// Theme: #{field.theme.name}
// Target: #{field.target_name} #{field.name}
// Last Edited: #{field.updated_at}
COMMENT
contents << value
if field.theme_id == theme.id
contents << value
else
contents << field.compiled_css(prepended_scss)
end
end
end

View file

@ -58,7 +58,7 @@ class Stylesheet::Manager
theme_ids = [theme_ids] unless Array === theme_ids
theme_ids = [theme_ids.first] unless target =~ THEME_REGEX
theme_ids = Theme.transform_ids(theme_ids)
theme_ids = Theme.transform_ids(theme_ids, extend: false)
current_hostname = Discourse.current_hostname