mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-11 06:20:42 +00:00
Handle dark/light/contrast theme modes in common CSS (#37095)
This commit is contained in:
@@ -153,10 +153,8 @@ module ApplicationHelper
|
||||
tag.meta(content: content, property: property)
|
||||
end
|
||||
|
||||
def body_classes
|
||||
def html_classes
|
||||
output = []
|
||||
output << content_for(:body_classes)
|
||||
output << "theme-#{current_theme.parameterize}"
|
||||
output << 'system-font' if current_account&.user&.setting_system_font_ui
|
||||
output << 'custom-scrollbars' unless current_account&.user&.setting_system_scrollbars_ui
|
||||
output << (current_account&.user&.setting_reduce_motion ? 'reduce-motion' : 'no-reduce-motion')
|
||||
@@ -164,6 +162,12 @@ module ApplicationHelper
|
||||
output.compact_blank.join(' ')
|
||||
end
|
||||
|
||||
def body_classes
|
||||
output = []
|
||||
output << content_for(:body_classes)
|
||||
output.compact_blank.join(' ')
|
||||
end
|
||||
|
||||
def cdn_host
|
||||
Rails.configuration.action_controller.asset_host
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user