From 07f157a4e81bf1a76ac295063985b491dbe8d25e Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Fri, 15 Dec 2017 02:06:44 +0100 Subject: [PATCH] Fixes page unlock button styling. --- .../scss/components/_formatters.scss | 5 ++-- .../wagtailadmin/scss/components/_header.scss | 8 ----- .../wagtailadmin/pages/_lock_switch.html | 30 ++++++------------- 3 files changed, 12 insertions(+), 31 deletions(-) diff --git a/wagtail/admin/static_src/wagtailadmin/scss/components/_formatters.scss b/wagtail/admin/static_src/wagtailadmin/scss/components/_formatters.scss index 149c88211f..34bf2b0d3e 100644 --- a/wagtail/admin/static_src/wagtailadmin/scss/components/_formatters.scss +++ b/wagtail/admin/static_src/wagtailadmin/scss/components/_formatters.scss @@ -98,6 +98,7 @@ border: 1px solid lighten($color-grey-2, 30%); color: lighten($color-grey-2, 30%); -webkit-font-smoothing: auto; + line-height: 1.9em; font-size: 0.8em; margin: 0 0.5em 0.5em; background: #fff url('#{$images-root}bg-dark-diag.svg'); @@ -109,14 +110,14 @@ } } -form.status-tag:hover, +button.status-tag:hover, a.status-tag:hover, a.status-tag.primary:hover { border-color: $color-teal; color: $color-teal; } -form.status-tag:hover { +button.status-tag:hover { border-color: $color-teal-dark; background-color: $color-teal-darker; color: $color-white; diff --git a/wagtail/admin/static_src/wagtailadmin/scss/components/_header.scss b/wagtail/admin/static_src/wagtailadmin/scss/components/_header.scss index 179a5c67f4..689ab2c518 100644 --- a/wagtail/admin/static_src/wagtailadmin/scss/components/_header.scss +++ b/wagtail/admin/static_src/wagtailadmin/scss/components/_header.scss @@ -71,14 +71,6 @@ header { padding-bottom: 0; } - .button { - background-color: $color-teal-darker; - - &:hover { - background-color: $color-teal-dark; - } - } - label { @include visuallyhidden(); } diff --git a/wagtail/admin/templates/wagtailadmin/pages/_lock_switch.html b/wagtail/admin/templates/wagtailadmin/pages/_lock_switch.html index c83cca7a8c..088a75b67d 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/_lock_switch.html +++ b/wagtail/admin/templates/wagtailadmin/pages/_lock_switch.html @@ -4,28 +4,16 @@ {% page_permissions page as page_perms %} {% endif %} -
+
{% trans "Edit lock" %} - {% if page.locked %} - {% if page_perms.can_lock %} - - {% csrf_token %} - - -
+ {% csrf_token %} + +
+ +