File: common.scss

package info (click to toggle)
datatables.js 1.11.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 22,848 kB
  • sloc: javascript: 65,075; xml: 10,712; php: 4,741; sh: 544; makefile: 18
file content (143 lines) | stat: -rw-r--r-- 2,641 bytes parent folder | download
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

//
// Variables
//

$control-button-top: 9px !default;
$control-button-size: 1em !default;
$control-button-color: white !default;
$open-button-background: #31b131 !default;
$close-button-background: #d33333 !default;


//
// Mixins
//
@mixin control() {
	display: inline-block;
	color: $control-button-color;
	border: 0.15em solid white;
	border-radius: 1em;
	box-shadow: 0 0 0.2em #444;
	box-sizing: content-box;
	text-align: center;
	text-indent: 0 !important;

	// Use Courier New because it is common and consistent
	font-family: 'Courier New', Courier, monospace;
	line-height: 1em;
}

@mixin control-open() {
	content: '+';
	background-color: $open-button-background;
}

@mixin control-close() {
	content: '-';
	background-color: $close-button-background;
}

table.dataTable {
    // Typography
    th.dt-left,
    td.dt-left {
        text-align: left;
    }

    th.dt-center,
    td.dt-center,
    td.dataTables_empty {
        text-align: center;
    }

    th.dt-right,
    td.dt-right {
        text-align: right;
    }

    th.dt-justify,
    td.dt-justify {
        text-align: justify;
    }

    th.dt-nowrap,
    td.dt-nowrap {
        white-space: nowrap;
    }

    thead,
    tfoot {
        th.dt-head-left,
        td.dt-head-left {
            text-align: left;
        }

        th.dt-head-center,
        td.dt-head-center{
            text-align: center;
        }

        th.dt-head-right,
        td.dt-head-right {
            text-align: right;
        }

        th.dt-head-justify,
        td.dt-head-justify {
            text-align: justify;
        }

        th.dt-head-nowrap,
        td.dt-head-nowrap {
            white-space: nowrap;
        }
    }

    tbody {
        th.dt-body-left,
        td.dt-body-left {
            text-align: left;
        }

        th.dt-body-center,
        td.dt-body-center {
            text-align: center;
        }

        th.dt-body-right,
        td.dt-body-right {
            text-align: right;
        }

        th.dt-body-justify,
        td.dt-body-justify {
            text-align: justify;
        }

        th.dt-body-nowrap,
        td.dt-body-nowrap {
            white-space: nowrap;
        }
    }

    // Child row controls
    td.dt-control {
        text-align: center;
        cursor: pointer;
    
        &:before {
            height: $control-button-size;
            width: $control-button-size;
            margin-top: -$control-button-top;
            @include control;
            @include control-open;
        }
    }
    
    tr.dt-hasChild {
        td.dt-control:before {
            @include control-close;
        }
    }
}