summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/pages/login.scss20
-rw-r--r--app/views/devise/shared/_signup_box.html.haml6
-rw-r--r--changelogs/unreleased/29000-style-captcha.yml4
3 files changed, 27 insertions, 3 deletions
diff --git a/app/assets/stylesheets/pages/login.scss b/app/assets/stylesheets/pages/login.scss
index 3cbe8dededb..3406653f796 100644
--- a/app/assets/stylesheets/pages/login.scss
+++ b/app/assets/stylesheets/pages/login.scss
@@ -231,6 +231,26 @@
height: 100%;
}
+.recaptcha-responsive-wrapper {
+ @function recaptcha-scale($container-width) {
+ $recaptcha-width: 304px;
+ @return $container-width / $recaptcha-width;
+ }
+
+ margin-bottom: 8px;
+ transform: scale(recaptcha-scale(260px));
+ transform-origin: 0 0;
+
+ @media (min-width: $screen-sm-min) {
+ transform: scale(recaptcha-scale(252.5px));
+ }
+
+ @media (min-width: $screen-md-min) {
+ transform: scale(recaptcha-scale(340px));
+ margin-bottom: 28px;
+ }
+}
+
// Fixes footer container to bottom of viewport
.devise-layout-html body {
// offset height of fixed header + 1 to avoid scroll
diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml
index d696577278d..8d5f3d1c8f5 100644
--- a/app/views/devise/shared/_signup_box.html.haml
+++ b/app/views/devise/shared/_signup_box.html.haml
@@ -22,9 +22,9 @@
= f.label :password
= f.password_field :password, class: "form-control bottom", required: true, pattern: ".{#{@minimum_password_length},}", title: "Minimum length is #{@minimum_password_length} characters."
%p.gl-field-hint Minimum length is #{@minimum_password_length} characters
- %div
- - if Gitlab::Recaptcha.enabled?
- = recaptcha_tags
+ .recaptcha-responsive-wrapper
+ - if Gitlab::Recaptcha.enabled?
+ = recaptcha_tags
%div
= f.submit "Register", class: "btn-register btn"
.clearfix.submit-container
diff --git a/changelogs/unreleased/29000-style-captcha.yml b/changelogs/unreleased/29000-style-captcha.yml
new file mode 100644
index 00000000000..e5cf1a07f13
--- /dev/null
+++ b/changelogs/unreleased/29000-style-captcha.yml
@@ -0,0 +1,4 @@
+---
+title: responsive recaptcha on register form
+merge_request:
+author: