]> cat aescling's git repositories - mastodon.git/commitdiff
Load custom CSS rules after standard ones
authorThibaut Girka <thib@sitedethib.com>
Thu, 4 Apr 2019 17:38:48 +0000 (19:38 +0200)
committerThibG <thib@sitedethib.com>
Mon, 22 Apr 2019 21:07:27 +0000 (23:07 +0200)
Fixes #933

Due to glitch-soc's theming system, JS and CSS files are imported in a slightly
different order, and custom CSS rules were loaded *before* everything else.

They will now be loaded *after* everything else, which is a bit different from
upstream but should work better overall.

app/views/layouts/application.html.haml

index 7d3daf6c9e89e419d33d600ca1a5f2d0369639a0..34c25a7d1a3598acf10292d9dea15581aae2a4a0 100755 (executable)
         = javascript_pack_tag "locales/#{@theme[:flavour]}/en", integrity: true, crossorigin: 'anonymous'
     = csrf_meta_tags
 
-    - if Setting.custom_css.present?
-      = stylesheet_link_tag custom_css_path, media: 'all'
-
     = yield :header_tags
 
     -#  These must come after :header_tags to ensure our initial state has been defined.
     = render partial: 'layouts/theme', object: @core
     = render partial: 'layouts/theme', object: @theme
 
+    - if Setting.custom_css.present?
+      = stylesheet_link_tag custom_css_path, media: 'all'
+
   %body{ class: body_classes }
     = content_for?(:content) ? yield(:content) : yield