forked from mleibman/SlickGrid
-
Notifications
You must be signed in to change notification settings - Fork 3
/
slick.grid.sass
237 lines (193 loc) · 4.39 KB
/
slick.grid.sass
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
// IMPORTANT:
// In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
// No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS
// classes should alter those!
// DEBUG ONLY:
//.slickGrid.debug
// .slick-row
// background-color: transparent !important
// .slick-row.even
// background-color: rgba(0, 0, 0, 0.05) !important
// .viewport, .canvas
// box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1)
// .viewport
// background-color: rgba(0, 255, 0, 0.05)
// .canvas
// background-color: rgba(0, 0, 255, 0.05)
.slickGrid .header,
.slickGrid .subHeaders,
.slickGrid .row,
.slickGrid .cell
box-sizing: border-box
.slickGrid [hideFocus]
outline: none !important
// Height for header and sub header rows
.slickGrid .header
$h: 40px
height: $h
.cell
$padding: 4px
padding: $padding
line-height: $h - $padding*2
.slickGrid .subHeaders
$h: 21px
.subHeader-row
height: $h
position: relative
.cell
$padding: 2px
height: $h
padding: $padding
line-height: $h - $padding*2
// Height for normal grid rows
.slickGrid .row
$h: 30px
height: $h
line-height: $h
.cell
padding: 0 2px
// Main:
.slickGrid
overflow: hidden
outline: 0
.row.even
background: #f9f9f9
.focus-sink
position: fixed
width: 0
height: 0
top: 0
left: 0
outline: 0
.viewport-wrap,
.viewport
position: absolute
width: 100% // easy handling of the no-pinned column case
.viewport-wrap
bottom: 0
overflow: hidden
.antiscroll-scrollbar
z-index: 1
.viewport
overflow: auto
outline: 0 // removes the focus effect that shows while scrolling
// the top left and right viewports don't scroll.
// also, since we don't use native scrolling on
// pinned columns anyway, hide their scroll bars.
&.T.L,
&.T.R,
&.pinned
overflow: hidden
&.antiscroll-inner
height: 100%
left: 0
top: 0
.canvas
position: relative
.row
position: absolute
border: 0
width: 100%
.cell
position: absolute
height: 100%
border: 1px solid transparent
border-right: 1px dotted silver
border-bottom-color: silver
overflow: hidden
-o-text-overflow: ellipsis
text-overflow: ellipsis
vertical-align: middle
z-index: 1
margin: 0
white-space: nowrap
cursor: default
&.highlighted
background: lightskyblue
background: rgba(0, 0, 255, 0.2)
-webkit-transition: all 0.5s
-moz-transition: all 0.5s
-o-transition: all 0.5s
transition: all 0.5s
&.flashing
border: 1px solid red !important
&.editable
z-index: 11
overflow: visible
background: white
border-color: black
border-style: solid
&:focus
outline: none
&.selected
background: beige
&.active
background: lightskyblue
.slickGrid .header,
.slickGrid .subHeaders
position: relative
white-space: nowrap
cursor: default
overflow: hidden
border-bottom: 1px solid silver
background: #f7f7f7
.slickGrid .header,
.slickGrid .subHeaders
.cell
border-right: 1px solid silver
border-left: 0
border-top: 0
border-bottom: 0
//background-color: rgba(0,0,0,.05) // debug
&.active
background: transparent
.slickGrid .subHeaders
background: #ddd
.cell input
box-sizing: border-box
width: 100%
height: 100%
.slickGrid .row.slick-group
background-color: #eef7ff
.slickGrid .row.slick-group-totals
background-color: #f2fff9
.slick-sort-indicator
display: inline-block
width: 8px
height: 5px
margin-left: 4px
margin-top: 6px
float: left
.slick-sort-indicator-desc
background: url(images/sort-desc.gif)
.slick-sort-indicator-asc
background: url(images/sort-asc.gif)
.slickGrid .resizer
position: absolute
font-size: 0.1px
display: block
cursor: col-resize
width: 4px
right: 0px
top: 0
height: 100%
.slick-sortable-placeholder
background: silver
.slick-group-toggle
display: inline-block
.slick-reorder-proxy
display: inline-block
background: blue
opacity: 0.15
filter: alpha(opacity = 15)
cursor: move
.slick-reorder-guide
display: inline-block
height: 2px
background: blue
opacity: 0.7
filter: alpha(opacity = 70)
.slick-selection
z-index: 10
position: absolute
border: 2px dashed black