From 88bc4780557124c4cef62a72688b2f972a0d8c42 Mon Sep 17 00:00:00 2001 From: Hendrik Leppelsack Date: Tue, 15 Sep 2015 20:26:24 +0200 Subject: [PATCH] use label:before instead of label --- core/css/styles.css | 40 ++++++++++++++++++++++------------------ core/templates/login.php | 4 ++-- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 2d1a4517f0..2ec5129a1c 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -166,33 +166,34 @@ input[type="checkbox"] { display: none; } -input[type="checkbox"] + label { - background: url('../img/actions/checkbox.svg') no-repeat; - opacity: 0.7; -} +input[type="checkbox"] + label:before { + content: ""; + display: inline-block; -input[type="checkbox"] + label.white { - background: url('../img/actions/checkbox-white.svg') no-repeat; -} + height: 20px; + width: 20px; + vertical-align: middle; -input[type="checkbox"]:checked + label { - background: url('../img/actions/checkbox-checked.svg') no-repeat; + background: url('../img/actions/checkbox.svg') left center no-repeat; opacity: 0.7; } -input[type="checkbox"]:checked + label.white { - background: url('../img/actions/checkbox-checked-white.svg') no-repeat; +input[type="checkbox"].white + label:before { + background-image: url('../img/actions/checkbox-white.svg'); } -input[type="checkbox"] + label, -input[type="checkbox"] + label.white, -input[type="checkbox"]:checked + label, -input[type="checkbox"]:checked + label.white { - background-position: left; - padding-left: 20px; +input[type="checkbox"]:checked + label:before { + background-image: url('../img/actions/checkbox-checked.svg'); +} + +input[type="checkbox"].white:checked + label:before { + background-image: url('../img/actions/checkbox-checked-white.svg'); +} + +input[type="checkbox"]:hover+label:before, input[type="checkbox"]:focus+label:before { + color:#111 !important; } -input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:#111 !important; } input[type="time"] { width: initial; height: 31px; @@ -705,6 +706,9 @@ label.infield { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; opacity: .3; } +#show + label:before, #dbpassword + label:before, #personal-show + label:before { + display: none; +} #pass2, input[name="personal-password-clone"] { padding: .6em 2.5em .4em .4em; width: 8em; diff --git a/core/templates/login.php b/core/templates/login.php index 69d0b033e9..08c7768a43 100644 --- a/core/templates/login.php +++ b/core/templates/login.php @@ -66,8 +66,8 @@ script('core', [
- - + +