]> git.openstreetmap.org Git - rails.git/commitdiff
Use bootstrap utility class instead of custom css
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 16 Dec 2020 11:57:34 +0000 (11:57 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 16 Dec 2020 17:34:12 +0000 (17:34 +0000)
app/assets/stylesheets/common.scss
app/helpers/user_helper.rb
test/helpers/user_helper_test.rb

index 2fa00d00989a6f19eae586d04695985831a30d69..46ef1c3497b8388e5636bddea685b58aa206666a 100644 (file)
@@ -1338,10 +1338,6 @@ tr.turn:hover {
     float: left;
     padding: $lineheight/4 $lineheight/2;
   }
     float: left;
     padding: $lineheight/4 $lineheight/2;
   }
-
-  li a img {
-    border-radius: 4px;
-  }
 }
 
 /* Rules for the account confirmation page */
 }
 
 /* Rules for the account confirmation page */
index a3d4bfb57cbf0721110304b4b5d170726b54e9ba..5b33b57b331f8d842b49c201ae30ef129701de20 100644 (file)
@@ -58,7 +58,7 @@ module UserHelper
 
   def auth_button(name, provider, options = {})
     link_to(
 
   def auth_button(name, provider, options = {})
     link_to(
-      image_tag("#{name}.svg", :alt => t("users.login.auth_providers.#{name}.alt")),
+      image_tag("#{name}.svg", :alt => t("users.login.auth_providers.#{name}.alt"), :class => "rounded-lg"),
       auth_path(options.merge(:provider => provider)),
       :class => "auth_button",
       :title => t("users.login.auth_providers.#{name}.title")
       auth_path(options.merge(:provider => provider)),
       :class => "auth_button",
       :title => t("users.login.auth_providers.#{name}.title")
index 5bee6d0c8bb750b6262c0d51223e08c241c183a2..340d2494d469894d503ba958a64e7f9bee2977f8 100644 (file)
@@ -73,10 +73,10 @@ class UserHelperTest < ActionView::TestCase
 
   def test_auth_button
     button = auth_button("google", "google")
 
   def test_auth_button
     button = auth_button("google", "google")
-    assert_equal("<a class=\"auth_button\" title=\"Login with Google\" href=\"/auth/google\"><img alt=\"Login with a Google OpenID\" src=\"/images/google.svg\" /></a>", button)
+    assert_equal("<a class=\"auth_button\" title=\"Login with Google\" href=\"/auth/google\"><img alt=\"Login with a Google OpenID\" class=\"rounded-lg\" src=\"/images/google.svg\" /></a>", button)
 
     button = auth_button("yahoo", "openid", :openid_url => "yahoo.com")
 
     button = auth_button("yahoo", "openid", :openid_url => "yahoo.com")
-    assert_equal("<a class=\"auth_button\" title=\"Login with Yahoo\" href=\"/auth/openid?openid_url=yahoo\.com\"><img alt=\"Login with a Yahoo OpenID\" src=\"/images/yahoo.svg\" /></a>", button)
+    assert_equal("<a class=\"auth_button\" title=\"Login with Yahoo\" href=\"/auth/openid?openid_url=yahoo\.com\"><img alt=\"Login with a Yahoo OpenID\" class=\"rounded-lg\" src=\"/images/yahoo.svg\" /></a>", button)
   end
 
   private
   end
 
   private