diff --git a/app/views/users/custom_style.css.erb b/app/views/users/custom_style.css.erb index 9c3d36e13..bb59065fd 100644 --- a/app/views/users/custom_style.css.erb +++ b/app/views/users/custom_style.css.erb @@ -1 +1,7 @@ -<%= CurrentUser.user.custom_style.gsub(/(\S)\s*(?:!important)?\s*(;|})/, "\\1!important\\2").html_safe %> \ No newline at end of file +<% CurrentUser.user.custom_style.split.each do |line| %> + <% if line =~ /^@import/ %> + <%= raw(line) %> + <% else %> + <%= raw(line.gsub(/(\S)\s*(?:!important)?\s*(;|})/, "\\1 !important\\2")) %> + <% end %> +<% end %>