From 331944642a88fe32f5d154bf6094e4f5b82e8b54 Mon Sep 17 00:00:00 2001 From: Olimpia Magliulo <olimpiam@intern-ikts-MacBook-Air.local> Date: Thu, 7 Dec 2017 22:26:19 +0100 Subject: [PATCH] Css optimisation, message-box - Add class message-box which combined with .error or .success replaces errorbox and successbox. - responsive for rtl --- modules/core/templates/loginuserpass.twig | 2 +- modules/sanitycheck/templates/check.twig | 4 ++-- www/assets/css/src/default-rtl.css | 11 ++++------- www/assets/css/src/default.css | 23 ++++++++++------------- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/modules/core/templates/loginuserpass.twig b/modules/core/templates/loginuserpass.twig index f90ce56a0..297a72f6d 100644 --- a/modules/core/templates/loginuserpass.twig +++ b/modules/core/templates/loginuserpass.twig @@ -12,7 +12,7 @@ {% if errorcode %} <div class="pure-g"> <div class="pure-u-1"> - <div class="errorbox b-radius"> + <div class="message-box error"> {% set errtitles = errorcodes['title'] %} {% set errtitle = errtitles[errorcode] %} diff --git a/modules/sanitycheck/templates/check.twig b/modules/sanitycheck/templates/check.twig index d3e6bd75d..fe51f4180 100644 --- a/modules/sanitycheck/templates/check.twig +++ b/modules/sanitycheck/templates/check.twig @@ -6,7 +6,7 @@ {% if errors %} -<div class="errorbox"> +<div class="message-box error"> <div class="pure-g"> <div class="pure-u-1-12"> <span class="fa fa-times-circle fa-2x"></span> @@ -25,7 +25,7 @@ {% endif %} {% if info %} -<div class="successbox"> +<div class="message-box success"> <div class="pure-g"> <div class="pure-u-1-12"> <span class="fa fa-check fa-2x"> </span> diff --git a/www/assets/css/src/default-rtl.css b/www/assets/css/src/default-rtl.css index 473de00c6..801ef3502 100644 --- a/www/assets/css/src/default-rtl.css +++ b/www/assets/css/src/default-rtl.css @@ -86,20 +86,17 @@ fieldset.fancyfieldset legend { left:0; right: auto; } -.errorbox { +.message-box { border-left-style: initial; border-left-width: 0; border-left-color: none; border-right-style: solid; border-right-width: 0.3125rem; +} +.message-box.error{ border-right-color: #cc4b37; } -.successbox{ - border-left-style: initial; - border-left-width: 0; - border-left-color: none; - border-right-style: solid; - border-right-width: 0.3125rem; +.message-box.success{ border-right-color: #46cc48; } diff --git a/www/assets/css/src/default.css b/www/assets/css/src/default.css index 328fa2e94..1387cf494 100644 --- a/www/assets/css/src/default.css +++ b/www/assets/css/src/default.css @@ -121,25 +121,22 @@ CONTENT padding-top: 2em; padding-bottom: 4rem; } -.errorbox { - padding: 1.3rem; - margin: 0 0 1rem 0; - background-color: #f7e4e1; + +.message-box { border-left-style: solid; border-left-width: 0.3125rem; - border-left-color: #cc4b37; - position: relative; box-shadow: 0 5px 8px -6px rgba(0, 0, 0, 0.2); -} -.successbox{ - padding: 1.3rem; margin: 0 0 1rem 0; + padding: 1.3rem; + position: relative; +} +.message-box.error { + background-color: #f7e4e1; + border-left-color: #cc4b37; +} +.message-box.success { background-color: #daf7e6; - border-left-style: solid; - border-left-width: 0.3125rem; border-left-color: #46cc48; - position: relative; - box-shadow: 0 5px 8px -6px rgba(0, 0, 0, 0.2); } .auth_methods{ -- GitLab