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