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