Issue #23853: More widget refactoring.
[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         &.xv-relationwidget {
150           .xv-description {
151             overflow: hidden;
152
153             // This gives them 4 lines of description
154             display: -webkit-box;
155             -webkit-line-clamp: 4;
156             -webkit-box-orient: vertical;
157
158             max-width: 250px;
159             margin: 5px 5px 5px 80px;
160             font-size: 0.9em;
161
162             &.disabled {
163               color: @dim-gray;
164             }
165           }
166         }
167
168         &.xv-spinnerwidget {
169           .buttons {
170             display: block;
171             padding: 0;
172             margin: 1px 0 1px 10px;
173             width: 20px;
174             height: 20px;
175             background: transparent;
176             color: @slate-blue;
177             font-size: 20px;
178             border: none;
179           }
180           .slider {
181             margin: 15px 10px;
182           }
183           &.xv-numberwidget {
184             input {
185               width: 120px;
186             }
187           }
188         }
189
190         &.xv-combobox {
191           .icon-sort {
192             color: @slate-blue;
193             vertical-align: middle;
194           }
195         }
196
197         &.xv-numberwidget {
198           input {
199             text-align: right;
200           }
201         }
202
203         &.xv-moneywidget {
204           .onyx-input-decorator {
205             font-family: @groupboxFont;
206
207             input, .xv-money-label {
208               width: 80px;
209               text-align: right;
210             }
211           }
212           .xv-picker-button {
213             width: 65px;
214             padding: 10px 4px;
215           }
216         }
217       }
218
219       .enyo-fittable-columns-layout > * {
220         vertical-align: middle;
221       }
222     }
223
224     .onyx-input-decorator {
225       &.onyx-disabled {
226         .disabled;
227       }
228     }
229
230     .xv-totals-panel {
231       .onyx-input-decorator > input, * {
232         font-size: @totalsFontSize;
233       }
234       .xv-input {
235         border: none;
236       }
237     }
238   }
239 }