about summary refs log tree commit diff
path: root/app/controllers/user_webapp_css_controller.rb
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-10-31 16:44:31 -0500
committerFire Demon <firedemon@creature.cafe>2020-10-31 16:44:31 -0500
commit239e9239557d622b3638179a70cae9f8b4afb6f1 (patch)
tree375ee56afb9d5d361089b64d283d4f6fd0d60b97 /app/controllers/user_webapp_css_controller.rb
parentbc080cc4bb2a3103f32d1da2631024bb75233700 (diff)
Add lowercase mode
Diffstat (limited to 'app/controllers/user_webapp_css_controller.rb')
-rw-r--r--app/controllers/user_webapp_css_controller.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/user_webapp_css_controller.rb b/app/controllers/user_webapp_css_controller.rb
index b2baa2843..a0a82d6c3 100644
--- a/app/controllers/user_webapp_css_controller.rb
+++ b/app/controllers/user_webapp_css_controller.rb
@@ -59,12 +59,24 @@ class UserWebappCssController < ApplicationController
     )
   end
 
+  def css_lowercase
+    return unless @account.user&.setting_style_lowercase
+
+    %(
+      div, button, span
+      { text-transform: lowercase; }
+
+      code, pre
+      { text-transform: initial !important; }
+    )
+  end
+
   def css_webapp
     @account.user&.setting_style_css_webapp_errors.blank? ? (@account.user&.setting_style_css_webapp || '') : ''
   end
 
   def css
-    "#{css_dashed_nest}\n#{css_underline_a}\n#{css_wide_media}\n#{css_webapp}".squish
+    "#{css_dashed_nest}\n#{css_underline_a}\n#{css_wide_media}\n#{css_lowercase}\n#{css_webapp}".squish
   end
 
   def set_account