From 42b3b019e01ee0c290a510483a2400e85cc250f1 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 22 Nov 2019 15:56:59 +0100 Subject: [PATCH] Fix blur behind closed registration message (#12442) * Fix closed registration message blur * Adjust overlay margins to account for blur Fixes #12425 --- app/javascript/styles/mastodon/forms.scss | 8 +++++++- app/views/about/_registration.html.haml | 14 +++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index b729d912e5..a0478bf7fd 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -513,6 +513,10 @@ code { &__overlay-area { position: relative; + &__blurred form { + filter: blur(2px); + } + &__overlay { position: absolute; top: 0; @@ -523,8 +527,10 @@ code { justify-content: center; align-items: center; background: rgba($ui-base-color, 0.65); - backdrop-filter: blur(2px); border-radius: 4px; + margin-left: -4px; + margin-top: -4px; + padding: 4px; &__content { text-align: center; diff --git a/app/views/about/_registration.html.haml b/app/views/about/_registration.html.haml index 1333c68c4f..af28e21749 100644 --- a/app/views/about/_registration.html.haml +++ b/app/views/about/_registration.html.haml @@ -1,5 +1,5 @@ -= simple_form_for(new_user, url: user_registration_path, namespace: 'registration') do |f| - .simple_form__overlay-area +.simple_form__overlay-area{ class: (closed_registrations? && @instance_presenter.closed_registrations_message.present?) ? 'simple_form__overlay-area__blurred' : '' } + = simple_form_for(new_user, url: user_registration_path, namespace: 'registration') do |f| %p.lead= t('about.federation_hint_html', instance: content_tag(:strong, site_hostname)) .fields-group @@ -21,8 +21,8 @@ .actions = f.button :button, sign_up_message, type: :submit, class: 'button button-primary', disabled: closed_registrations? - - if closed_registrations? && @instance_presenter.closed_registrations_message.present? - .simple_form__overlay-area__overlay - .simple_form__overlay-area__overlay__content.rich-formatting - .block-icon= fa_icon 'warning' - = @instance_presenter.closed_registrations_message.html_safe + - if closed_registrations? && @instance_presenter.closed_registrations_message.present? + .simple_form__overlay-area__overlay + .simple_form__overlay-area__overlay__content.rich-formatting + .block-icon= fa_icon 'warning' + = @instance_presenter.closed_registrations_message.html_safe