_checkbox.scss 1.58 KB
Newer Older
Michael Herold's avatar
Michael Herold committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
Copyright (C) 2015 Michael Herold <quabla@hemio.de>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
/* 
    Created on : Jan 20, 2015, 1:27:15 AM
    Author     : Michael Herold <quabla@hemio.de>
*/

span.checkbox {
    width: 100%;
    display: flex;
    margin: 0;
    height: $list-entry-height;
    align-items: center;
}

span.checkbox::before {
    margin-right: 1em;
    display: inline-block;
    font-size: 1.8em;
    vertical-align: middle;

    border-radius: 0.15em;
    width: 0.75em;
    height: 0.75em;
    @include button-background($button-color);
    line-height: 0.7em;
    border: 1px solid $control-border-color;
    color: lightgray;
    text-shadow: 1px 1px darken(lightgray, 20%);
    content: '';
}

span.checkbox:hover::before {
    content: '✔';
}

input:checked + p span.checkbox::before {
Michael Herold's avatar
Michael Herold committed
52
    color: $button-suggested-text-color;
Michael Herold's avatar
Michael Herold committed
53
54
55
56
57
    text-shadow: 1px 1px $button-suggested-border-color;
    @include button-background($button-suggested-color);
    border-color: $button-suggested-border-color;
    content: '✔';
}