Issue #23853: Fixed grid issues and spinner widget.
[xtuple] / lib / enyo-x / source / less / workspace.less
1 @panelSpacing: 4px;
2 @labelWidth: 120px;
3 @decoratorPadding: 8px;
4 @fieldDecoratorWidth: 180px;
5 @fieldWidth: @fieldDecoratorWidth - (2 * @decoratorPadding);
6 @iconWidth: 16px;
7 @iconPadding: 4px;
8 @iconFieldWidth: @fieldWidth - @iconWidth - (2 * @iconPadding);
9
10 .xv-workspace-container {
11
12   background: @white;
13   .box-shadow(-2px -2px 6px rgba(0,0,0,0.20));
14
15   .xv-content-panel {
16     .xv-header {
17       .xv-navigator > .xv-header;
18       padding: 6px 12px;
19       border: none;
20     }
21   }
22
23   >.xv-menu-container {
24     .xv-navigator > .xv-menu-container;
25     .xv-header {
26       .xv-navigator > .xv-header;
27     }
28   }
29
30   .xv-workspace {
31     background-color: @white;
32
33     >.enyo-panels {
34       width: 100% !important;
35       height: 100% !important;
36     }
37
38     // Standard button styling
39     .xv-buttons {
40       .onyx-button {
41         border: 1px solid @smoke;
42         &[disabled] {
43           opacity: 0.6;
44           cursor: default;
45         }
46       }
47     }
48
49     // Inside the panel, the buttons are in a bar
50     .panel {
51       .xv-buttons {
52         background-color: @lightest-gray;
53         margin: 0;
54         .onyx-button {
55           border-radius: 0;
56           margin: 0;
57         }
58       }
59     }
60
61     .xv-workspace-panel {
62
63       .onyx-groupbox-header {
64         padding: 6px 10px;
65         border-bottom: 1px solid @smoke;
66         background: @lightest-gray;
67         color: @near-black;
68         i {
69           margin-right: 10px;
70         }
71       }
72
73       width: @defaultPanelWidth;
74       margin: 0 @panelSpacing 0 2px;
75       padding: 0;
76       background: @ghost;
77       text-overflow: ellipsis;
78       border: 1px solid @smoke;
79
80       &.small-panel {
81         width: 600px;
82       }
83       &.medium-panel {
84         width: 700px;
85       }
86       &.large-panel {
87         width: 800px;
88       }
89
90       // fix labels with widget refactor
91       .xv-label, .xv-decorated-label, .xv-flexible-label {
92         width: @labelWidth;
93         max-width: 100%;
94         text-align: right;
95         padding: 0 8px 0 6px;
96         vertical-align: middle;
97         &.disabled {
98           color: @dim-gray;
99         }
100       }
101
102       &.xv-assignment-box {
103         .xv-flexible-label, .xv-label {
104           width: 200px !important;
105         }
106       }
107
108       .xv-input {
109         padding: 4px 0;
110         border-bottom: 1px solid fade(@smoke, 50%);
111
112         .enyo-tool-decorator {
113           max-width: @fieldDecoratorWidth;
114           text-align: left;
115
116           .onyx-icon {
117             display: inline-block;
118             width: @iconWidth;
119             cursor: pointer;
120           }
121         }
122
123         &.xv-textarea {
124           padding: 0;
125           margin: @decoratorPadding;
126           .enyo-tool-decorator {
127             // reset max-width on text area
128             max-width: @defaultPanelWidth;
129           }
130         }
131
132         input {
133           width: @fieldWidth;
134         }
135
136         .xv-icon-decorator {
137           input {
138             width: @iconFieldWidth;
139           }
140           .onyx-icon {
141             padding: @iconPadding;
142           }
143         }
144
145         .onyx-picker-decorator {
146           padding: 0;  // @overrides the input-decorator padding above ^^
147         }
148       }
149
150       /**
151         Styles relating to workspace widgets
152       */
153       .xv-relationwidget {
154         .xv-description {
155           overflow: hidden;
156
157           // This gives them 4 lines of description
158           display: -webkit-box;
159           -webkit-line-clamp: 4;
160           -webkit-box-orient: vertical;
161
162           max-width: 250px;
163           margin: 5px 5px 5px 80px;
164           font-size: 0.9em;
165
166           &.disabled {
167             color: @dim-gray;
168           }
169         }
170       }
171
172       .xv-spinnerwidget {
173         .xv-icon-decorator {
174           .onyx-icon {
175             display: block;
176             border: none;
177             font-size: 20px;
178             width: 20px;
179             padding: 0 4px 0 4px;
180           }
181           input {
182             width: @iconFieldWidth - @iconPadding;
183           }
184         }
185         .slider {
186           margin: 15px 10px;
187         }
188       }
189
190       .xv-numberwidget {
191         input {
192           text-align: right;
193         }
194       }
195
196       .xv-moneywidget {
197         .enyo-tool-decorator {
198           // reset min/max-width
199           min-width: 90px;
200           max-width: 90px;
201           input {
202             width: 90px;
203           }
204         }
205       }
206
207       .xv-currency-picker {
208         display: inline-block;
209         .enyo-tool-decorator {
210           // reset min/max-width
211           min-width: 65px;
212           max-width: 65px;
213           padding: 10px 4px;
214           .xv-button-text {
215             width: 45px;
216           }
217         }
218       }
219
220       .xv-characteristics-widget {
221         .xv-characteristic-item {
222           border-bottom: 1px solid @smoke;
223           .xv-input {
224             border: none;
225             input {
226               width: 135px;
227             }
228           }
229         }
230         .xv-characteristic-button {
231           text-align: center;
232         }
233       }
234
235       .enyo-fittable-columns-layout > * {
236         vertical-align: middle;
237       }
238     }
239
240     .onyx-input-decorator {
241       border: 0;
242       input {
243         width: 150px;
244       }
245       &.onyx-disabled {
246         .disabled;
247       }
248     }
249
250     // Dependency picker in workflow
251     .xv-dependency-picker {
252       .onyx-picker-decorator {
253         .onyx-button {
254           width: 280px;
255           margin-left: 6px;
256         }
257       }
258     }
259
260     .xv-dependency-button {
261       color: @slate-blue;
262       font-size: 24px;
263       border: none;
264       background: transparent;
265     }
266
267     .xv-totals-panel {
268       .onyx-input-decorator > input, * {
269         font-size: @totalsFontSize;
270       }
271       .xv-input {
272         border: none;
273       }
274     }
275   }
276 }