summaryrefslogtreecommitdiffstats
path: root/less/admin/widgets.less
blob: fd68fed2a779ba321ae1a1b8e7e0b2e466a3fef8 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Copyright (C) 2014  Ipsilon project Contributors, for licensee see COPYING

// Widgets

// imitate tables
.ipsilon-row {

    // reuse bootstrap colors
    border-top: 1px solid @table-border-color;
    padding: @table-cell-padding;

    // to have equal height - basically a hack, increase if default elements are
    // larger. Proper equal height would have to be done in JavaScript.
    min-height: @input-height-large;
}


.ipsilon-row:last-child {
    border-bottom: 1px solid @table-border-color;
}

// add to div with 'ipsilon-row' class to change background
.hl-enabled {
    // ugly color
    background-color: @state-enabled-bg;
}

.hl-disabled {
    background-color: @state-disabled-bg;

    strong {
        color: #555;
    }
}

// animation
// https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_animations

@keyframes bgfadein {
    from {
        background-color: @state-disabled-bg;
    }
    to {
        background-color: @state-enabled-bg;
    }
}

@keyframes bgfadeout {
    from {
        background-color: @state-enabled-bg;
    }
    to {
        background-color: @state-disabled-bg;
    }
}

// add these classes to rows to hightlight them on load
.hl-enabled-new {
    animation-duration: 2s;
    animation-name: bgfadein;
    animation-fill-mode: both
}

.hl-disabled-new {
    animation-duration: 2s;
    animation-name: bgfadeout;
    animation-fill-mode: both
}

@keyframes flashout {
    0% {
        background-color: @state-enabled-bg;
    }
    50% {
        background-color: @state-info-bg;
    }
    100% {
        background-color: @state-enabled-bg;
    }
}

.hl-enabled-flash {
    animation-duration: 1s;
    animation-name: flashout;
    animation-fill-mode: both
}