fixed most widgets, grid still broken
[xtuple] / lib / enyo-x / source / less / grid.less
1 /*
2   Styles relating to the grid box
3 */
4
5 /* Entire box including the grid and the summary panel */
6 .xv-grid-box {
7
8   &.small-panel {
9     width: 600px;
10   }
11
12   &.medium-panel {
13     width: 700px;
14   }
15
16   &.large-panel {
17     width: 800px;
18   }
19
20   .enyo-list-page {
21     > *:first-child {
22       .xv-grid-row {
23         border-top: 0;
24       }
25     }
26   }
27
28   .xv-above-grid-list {
29     border: 0;
30   }
31
32   .xv-scroller {
33     background: @ghost;
34   }
35
36   .xv-grid-attr {
37     // This limits the text to three lines
38     overflow: hidden;
39     display: -webkit-box;
40     -webkit-line-clamp: 3;
41     -webkit-box-orient: vertical;
42
43     &.bold {
44     font-weight: bold;
45     }
46     &.error {
47       color: @bright-red;
48     }
49     &.emphasis {
50       color: @green;
51     }
52     &.warn {
53       color: @light-orange;
54     }
55     &.italic {
56       font-style: italic;
57     }
58     &.placeholder {
59       font-style: italic;
60       color: @blue-gray;
61     }
62     &.hyperlink {
63       color: blue;
64     }
65   }
66
67   .xv-gridbox-button {
68     color: @slate-blue;
69     font-size: 18px;
70     border: none;
71     background: transparent;
72   }
73
74
75   /**
76     This is the most general grid row that
77     is not specific to read-only or selected
78   */
79   .xv-grid-row {
80     font-size: 12px;
81     background-color: @gray;
82     border-bottom: 1px solid @silver;
83     > * {
84       display: inline-block;
85     }
86     vertical-align: top;
87
88     /**
89       This is the grid header row
90     */
91     .xv-grid-header {
92       background-color: @smoke;
93       color: @near-black;
94       font-size: .8em;
95       font-weight: bold;
96       text-transform: uppercase;
97       padding-top: 4px;
98       &.last {
99         border-right: none;
100       }
101     }
102     > * {
103       padding: 6px 4px;
104       border: none;
105     }
106
107     .line-number {
108       vertical-align: top;
109       width: 30px;
110       text-align: right;
111     }
112     .grid-actions {
113       display: block;
114       padding-left: 30px;
115       border-radius: 4px;
116       border-width: 0;
117       background: @earl-grey;
118       margin: 6px;
119       > * {
120         display: inline-block;
121         width: 100%;
122       }
123     }
124     .grid-item {
125       vertical-align: top;
126       width: 175px;
127     }
128     .quantity {
129       vertical-align: top;
130       text-align: right;
131       width: 100px;
132     }
133     .percent {
134       vertical-align: top;
135       text-align: right;
136       width: 90px;
137     }
138     .price {
139       vertical-align: top;
140       text-align: right;
141       width: 90px;
142     }
143     .date {
144       vertical-align: top;
145       width: 105px;
146     }
147     .user {
148       vertical-align: top;
149       width: 100px;
150     }
151
152     &.readonly {
153       background: @ghost;
154       min-height: 56px;
155     }
156
157     &.selected {
158       background-color: @white;
159       border: 1px solid @bright-orange;
160       .xv-grid-column {
161         .onyx-input-decorator {
162           .tightened-input-decorator;
163         }
164         .onyx-picker-decorator {
165           padding-top: 6px;
166           width: 100%;
167           .onyx-button {
168             height: 26px;
169             padding-top: 3px;
170             width: 100%;
171             font-size: 13px;
172           }
173         }
174         .xv-input {
175           border: none;
176         }
177         .xv-picker-label {
178           display: none;
179         }
180         .xv-datewidget {
181           margin-right: 10px;
182           padding-top: 0;
183           .onyx-input-decorator {
184             padding: 0;
185             width: 100%;
186             input {
187               width: 85%;
188               font-size: 13px;
189             }
190           }
191         }
192         .xv-numberwidget {
193           padding-top: 6px;
194           .onyx-input-decorator {
195             .tightened-input-decorator;
196           }
197         }
198         .xv-combobox {
199           padding-left: 0;
200           input {
201             padding-top: 3px;
202             width: 80px;
203             font-size: 13px;
204           }
205         }
206         .xv-moneywidget {
207           padding-bottom: 0;
208           .onyx-input-decorator {
209             .tightened-input-decorator;
210           }
211         }
212         .xv-useraccount-widget {
213           // Hack: we shouldn't have to force this.
214           .xv-subinput {
215             width: 80px;
216             height: 16px;
217           }
218         }
219         .xv-subinput {
220           width: 100%;
221         }
222         .xv-input {
223           padding-top: 6px;
224           width: 100%;
225           border: none;
226         }
227         .xv-label, .xv-flexible-label {
228           display: none;
229         }
230         .xv-relationwidget {
231           .xv-description {
232             margin: 0;
233             margin-top: 5px;
234           }
235           .onyx-input-decorator {
236             width: 100%;
237             padding-top: 6px;
238           }
239           .onyx-input {
240             width: 85%;
241             padding-right: 4px;
242           }
243         }
244         .xv-private-item-site-widget {
245           border-bottom: 0;
246         }
247       }
248     }
249   }
250   &.xv-groupbox {
251     .xv-sales-summary-panel {
252       border: none;
253       margin-top: 0;
254       padding-left: 0;
255       padding-right: 0;
256       .xv-sales-summary-total-group {
257         padding: 0;
258         border: none;
259         .xv-moneywidget {
260           padding-bottom: 0;
261           padding-top: 0;
262           .xv-input-decorator {
263             padding-bottom: 0;
264             padding-top: 0;
265           }
266         }
267         .xv-numberwidget {
268           padding-bottom: 0;
269           padding-top: 0;
270           .xv-input-decorator {
271             width: 163px;
272             padding-bottom: 0;
273             padding-top: 0;
274           }
275         }
276       }
277     }
278   }
279 }
280
281 .xv-grid-list {
282   .xv-list-column {
283     vertical-align: top !important;
284   }
285 }
286
287 .tightened-input-decorator (@width: 100%) {
288   padding: 0;
289   width: @width;
290   margin: 0;
291   input {
292     width: (@width);
293     font-size: 13px;
294   }
295 }