]> git.proxmox.com Git - extjs.git/blame - extjs/classic/theme-neutral/sass/src/view/Table.scss
add extjs 6.0.1 sources
[extjs.git] / extjs / classic / theme-neutral / sass / src / view / Table.scss
CommitLineData
6527f429
DM
1// This fixes a browser bug in Chrome (current as of 40.0.2214.111).\r
2// When using the buffered renderer plugin, the view rows are positioned by using CSS transforms.\r
3// However, b/c of the browser bug, the scrollbar will be covered by the itemcontainer when scrolled\r
4// to a point where the view is refreshed so we need to bump up its z-index. See EXTJS-15608.\r
5.#{$prefix}grid-view {\r
6 z-index: 1;\r
7}\r
8\r
9.#{$prefix}grid-body {\r
10 background: $grid-body-background-color;\r
11 border-width: $grid-body-border-width;\r
12 border-style: $grid-body-border-style;\r
13 border-color: $grid-body-border-color;\r
14}\r
15\r
16// The min-height ensures we get a horizontal scroll bar \r
17// if necessary, even when the grid has no items in it.\r
18.#{$prefix}grid-item-container {\r
19 min-height: 1px;\r
20 position: relative;\r
21 overflow: hidden;\r
22}\r
23\r
24.#{$prefix}grid-empty {\r
25 padding: $grid-empty-padding;\r
26 color: $grid-empty-color;\r
27 background-color: $grid-empty-background-color;\r
28 font: $grid-empty-font-weight $grid-empty-font-size $grid-empty-font-family;\r
29}\r
30\r
31// Default background color applied at table level - each row is its own separate table\r
32.#{$prefix}grid-item {\r
33 color: $grid-row-cell-color;\r
34 font: $grid-row-cell-font;\r
35 background-color: $grid-row-cell-background-color;\r
36}\r
37\r
38.#{$prefix}grid-item-alt {\r
39 background-color: $grid-row-cell-alt-background-color;\r
40}\r
41\r
42.#{$prefix}grid-item-over {\r
43 color: $grid-row-cell-over-color;\r
44 background-color: $grid-row-cell-over-background-color;\r
45}\r
46\r
47// IE does not support outline-offset property, so we have to\r
48// use pseudo element to show the focused cell border\r
49.#{$prefix}grid-item-focused {\r
50 // This is to remove the default outline in FF and IE\r
51 outline: 0;\r
52 \r
53 .#{$prefix}grid-cell-inner {\r
54 // Inner grid cell element has position: relative (a rule below),\r
55 // so setting z-index: 1 will elevate it just above default position\r
56 z-index: 1;\r
57 }\r
58 \r
59 // Pseudo-el is positioned *below* the inner grid cell content\r
60 // but its border will shine through\r
61 .#{$prefix}grid-cell-inner:before {\r
62 content: "";\r
63 position: absolute;\r
64 z-index: -1;\r
65 top: $grid-row-cell-focus-border-inset;\r
66 right: $grid-row-cell-focus-border-inset;\r
67 bottom: $grid-row-cell-focus-border-inset;\r
68 left: $grid-row-cell-focus-border-inset;\r
69 pointer-events: none;\r
70\r
71 border: $grid-row-cell-focus-border-width $grid-row-cell-focus-border-style $grid-row-cell-focus-border-color;\r
72 }\r
73 \r
74 @if not is-null($grid-row-cell-focus-color) {\r
75 color: $grid-row-cell-focus-color;\r
76 }\r
77 \r
78 @if not is-null($grid-row-cell-focus-background-color) {\r
79 background-color: $grid-row-cell-focus-background-color;\r
80 }\r
81}\r
82\r
83.#{$prefix}grid-item-selected {\r
84 color: $grid-row-cell-selected-color;\r
85 background-color: $grid-row-cell-selected-background-color;\r
86}\r
87\r
88.#{$prefix}grid-with-row-lines {\r
89 .#{$prefix}grid-item {\r
90 border-style: $grid-row-cell-border-style;\r
91 border-width: $grid-row-cell-border-width 0 0;\r
92 border-color: $grid-row-border-color;\r
93 }\r
94\r
95 .#{$prefix}grid-item:first-child {\r
96 border-top-color: $grid-row-cell-background-color;\r
97 }\r
98\r
99 // the following rules have .x-grid-item added to increase specificity over the\r
100 // :first-child rule above\r
101 .#{$prefix}grid-item.#{$prefix}grid-item-over {\r
102 border-style: $grid-row-cell-over-border-style;\r
103 border-color: $grid-row-cell-over-border-color;\r
104 }\r
105\r
106 .#{$prefix}grid-item-over + .#{$prefix}grid-item {\r
107 border-top-style: $grid-row-cell-over-border-style;\r
108 border-top-color: $grid-row-cell-over-border-color;\r
109 }\r
110\r
111 .#{$prefix}grid-item.#{$prefix}grid-item-selected {\r
112 border-style: $grid-row-cell-selected-border-style;\r
113 border-color: $grid-row-cell-selected-border-color;\r
114 }\r
115\r
116 .#{$prefix}grid-item-selected + .#{$prefix}grid-item {\r
117 border-top-style: $grid-row-cell-selected-border-style;\r
118 border-top-color: $grid-row-cell-selected-border-color;\r
119 }\r
120\r
121 .#{$prefix}grid-item:last-child {\r
122 border-bottom-width: $grid-row-cell-border-width;\r
123 }\r
124\r
125 // IE8 doesn't have last-child, so we end up with no border on the bottom row.\r
126 // To work around this issue we give all the rows a bottom border and negative\r
127 // margin so that they overlap. This approach doesn't work everywhere though...\r
128 // in newer IE, using the browser's zoom feature can result in rounding errors on \r
129 // the negative margin, resulting in the appearance of some borders being double.\r
130 .#{$prefix}ie8 & {\r
131 .#{$prefix}grid-item {\r
132 border-width: $grid-row-cell-border-width 0;\r
133 margin-top: (-$grid-row-cell-border-width);\r
134 }\r
135\r
136 .#{$prefix}grid-item:first-child {\r
137 margin-top: 0;\r
138 }\r
139 }\r
140}\r
141\r
142.#{$prefix}grid-cell-inner {\r
143 position: relative;\r
144 text-overflow: $grid-cell-inner-text-overflow;\r
145 padding: $grid-cell-inner-padding;\r
146}\r
147\r
148@if $include-rtl and (left($grid-cell-inner-padding) != right($grid-cell-inner-padding)) {\r
149 .#{$prefix}rtl.#{$prefix}grid-cell-inner {\r
150 padding: rtl($grid-cell-inner-padding);\r
151 }\r
152}\r
153\r
154@if $include-ext-grid-column-rownumberer\r
155 or $include-ext-selection-checkboxmodel\r
156 or $include-ext-grid-plugin-rowexpander {\r
157 // .x-grid-cell-special is used by RowNumberer, CheckboxModel, and RowExpander\r
158 .#{$prefix}grid-cell-special {\r
159 @if $grid-cell-special-border-width != 0 {\r
160 border-color: $grid-cell-special-border-color;\r
161 border-style: $grid-cell-special-border-style;\r
162 border-right-width: $grid-cell-special-border-width;\r
163 }\r
164 @if not is-null($grid-cell-special-background-color) {\r
165 @if is-null($grid-cell-special-background-gradient) {\r
166 background-color: $grid-cell-special-background-color;\r
167 } @else {\r
168 @include background-gradient($grid-cell-special-background-color, $grid-cell-special-background-gradient);\r
169 }\r
170\r
171 .#{$prefix}grid-item-selected & {\r
172 @if not is-null($grid-cell-special-selected-border-color) {\r
173 border-right-color: $grid-cell-special-selected-border-color;\r
174 }\r
175\r
176 @if not is-null($grid-row-cell-selected-background-color) {\r
177 @if is-null($grid-cell-special-background-gradient) {\r
178 background-color: $grid-row-cell-selected-background-color;\r
179 } @else {\r
180 @include background-gradient($grid-row-cell-selected-background-color, $grid-cell-special-background-gradient, left);\r
181 }\r
182 }\r
183 }\r
184\r
185 @if $include-slicer-gradient {\r
186 .#{$prefix}nlg & {\r
187 background-repeat: repeat-y;\r
188 background-image: slicer-background-image(grid-cell-special, 'grid/cell-special-bg');\r
189 }\r
190\r
191 .#{$prefix}nlg .#{$prefix}grid-item-selected & {\r
192 background-image: slicer-background-image(grid-cell-special-selected, 'grid/cell-special-selected-bg');\r
193 }\r
194 @include x-slicer(grid-cell-special);\r
195 @include x-slicer(grid-cell-special-selected);\r
196 }\r
197 }\r
198 }\r
199\r
200 @if $include-rtl and $grid-cell-special-border-width != 0 {\r
201 .#{$prefix}rtl.#{$prefix}grid-cell-special {\r
202 border-right-width: 0;\r
203 border-left-width: $grid-cell-special-border-width;\r
204 }\r
205 }\r
206}\r
207\r
208.#{$prefix}grid-dirty-cell {\r
209 @if $enable-font-icons and ($grid-cell-dirty-glyph != null) {\r
210 > .#{$prefix}grid-cell-inner:after {\r
211 @include font-icon($grid-cell-dirty-glyph, $pseudo: false);\r
212 color: $grid-cell-dirty-glyph-color;\r
213 position: absolute;\r
214 top: 0;\r
215 left: 0;\r
216 }\r
217 } @else {\r
218 background: theme-background-image('grid/dirty') no-repeat 0 0;\r
219 }\r
220}\r
221\r
222@if $include-rtl {\r
223 .#{$prefix}rtl.#{$prefix}grid-dirty-cell {\r
224 @if $enable-font-icons and ($grid-cell-dirty-glyph-rtl != null) {\r
225 > .#{$prefix}grid-cell-inner:after {\r
226 @include font-icon($grid-cell-dirty-glyph-rtl, $pseudo: false);\r
227 right: 0;\r
228 }\r
229 } @else {\r
230 background-image: theme-background-image('grid/dirty-rtl');\r
231 background-position: right 0;\r
232 }\r
233 }\r
234}\r
235\r
236// add grid-row class to increase specificity over the state rules that set background-color\r
237// e.g. .x-grid-item-over .x-grid-td, .x-grid-row-focused .x-grid-td\r
238.#{$prefix}grid-row .#{$prefix}grid-cell-selected {\r
239 color: $grid-cell-selected-color;\r
240 background-color: $grid-cell-selected-background-color;\r
241}\r
242\r
243// Column lines on leading edge where there may be whitespace following\r
244.#{$prefix}grid-with-col-lines {\r
245 .#{$prefix}grid-cell {\r
246 border-style: $grid-row-cell-border-style;\r
247 border-color: $grid-col-border-color;\r
248 border-width: 0 $grid-row-cell-border-width 0 0;\r
249 }\r
250\r
251 .#{$prefix}grid-item-over .#{$prefix}grid-cell {\r
252 border-color: $grid-row-cell-over-border-color;\r
253 border-style: $grid-row-cell-over-border-style;\r
254 }\r
255\r
256 .#{$prefix}grid-item-selected .#{$prefix}grid-cell {\r
257 border-color: $grid-row-cell-selected-border-color;\r
258 border-style: $grid-row-cell-selected-border-style;\r
259 }\r
260}\r
261\r
262// Column lines in RTL mode - leading edge is left.\r
263@if $include-rtl {\r
264 .#{$prefix}rtl.#{$prefix}grid-with-col-lines .#{$prefix}grid-cell {\r
265 border-width: 0 0 0 $grid-row-cell-border-width;\r
266 }\r
267}\r
268\r
269.#{$prefix}grid-resize-marker {\r
270 width: $grid-row-cell-border-width;\r
271 background-color: $grid-resize-marker-background-color;\r
272}\r