From b237379fa1f9549b0ec3c79ba476d0a870454cce Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Thu, 3 Aug 2017 19:18:17 +0200 Subject: Replace loading icon GIF with pure CSS loading icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pure CSS loading icon uses an ::after pseudo-element, and thus it can only be used on container elements; the input element is not a container element, so when the class "icon-loading-small" is set on an input element it falls back to a loading icon GIF. This commit modifies the markup of the login button to add a div element that holds the confirm icon and the loading icon (depending on the case). In order to position the icon in the same place as before the input and the icon are both wrapped by another div making possible to set the absolute position of the icon relative to the input. Signed-off-by: Daniel Calviño Sánchez --- core/css/guest.css | 15 +++++++++++++++ core/css/styles.scss | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'core/css') diff --git a/core/css/guest.css b/core/css/guest.css index e65f0a5de01..d46b2e895ca 100644 --- a/core/css/guest.css +++ b/core/css/guest.css @@ -131,6 +131,21 @@ form #datadirField legend { } /* Buttons and input */ +#submit-wrapper { + position: relative; /* Make the wrapper the containing block of its + absolutely positioned descendant icons */ +} +#submit-wrapper .icon-confirm-white { + position: absolute; + top: 23px; + right: 23px; +} +#submit-wrapper .icon-loading-small { + position: absolute; + top: 22px; + right: 24px; +} + input, textarea, select, button { font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; } diff --git a/core/css/styles.scss b/core/css/styles.scss index f2acca38e1e..36e1d8251de 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -754,6 +754,22 @@ label.infield { /* Log in and install button */ +#body-login #submit-wrapper { + position: relative; /* Make the wrapper the containing block of its + absolutely positioned descendant icons */ + + .icon-confirm-white { + position: absolute; + top: 23px; + right: 23px; + } + .icon-loading-small { + position: absolute; + top: 22px; + right: 24px; + } +} + #body-login input { font-size: 20px; margin: 5px; -- cgit v1.2.3 From 92d28fdc6833f99c79867fef57e94882071baa50 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Mon, 7 Aug 2017 13:48:20 +0200 Subject: Ignore clicks on login button icon so they are received by the button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Visually, the icon positioned on the login button is part of the login button, so clicking on the icon should be the same as clicking on the button. As the icon is a different element this commit sets the icon to ignore mouse events so they are received and handled by the login button instead. Signed-off-by: Daniel Calviño Sánchez --- core/css/guest.css | 7 +++++++ core/css/styles.scss | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'core/css') diff --git a/core/css/guest.css b/core/css/guest.css index d46b2e895ca..56f8c728d00 100644 --- a/core/css/guest.css +++ b/core/css/guest.css @@ -146,6 +146,13 @@ form #datadirField legend { right: 24px; } +#submit-wrapper #submit-icon { + pointer-events: none; /* The submit icon is positioned on the submit button. + From the user point of view the icon is part of the + button, so the clicks on the icon have to be + applied to the button instead. */ +} + input, textarea, select, button { font-family: 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif; } diff --git a/core/css/styles.scss b/core/css/styles.scss index 36e1d8251de..667ca0dc2be 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -768,6 +768,13 @@ label.infield { top: 22px; right: 24px; } + + #submit-icon { + pointer-events: none; /* The submit icon is positioned on the submit + button. From the user point of view the icon is + part of the button, so the clicks on the icon + have to be applied to the button instead. */ + } } #body-login input { -- cgit v1.2.3