Debian Codegraph @

dojox/mobile/themes/common/FormLayout.less

raw
1 /* Single Column Layout */
2 /**********************************************************************************************************************/
3
4 /*** columns == 'auto' ***/
5 @media all and (max-width: 500px) {
6 .mblFormLayout.mblFormLayoutAuto fieldset {
7 padding-left: 0;
8 padding-right: 0;
9 }
10
11 /* A gap between rows */
12 .mblFormLayout.mblFormLayoutAuto > * + * {
13 margin-top: 0.6em;
14 }
15
16 /* Text widgets */
17 .mblFormLayout.mblFormLayoutAuto .mblTextArea,
18 .mblFormLayout.mblFormLayoutAuto .mblExpandingTextArea,
19 .mblFormLayout.mblFormLayoutAuto .mblTextBox,
20 .mblFormLayout.mblFormLayoutAuto .mblSearchBox{
21 width: 100%;
22 box-sizing: border-box;
23 }
24 }
25
26 /*** columns == 'single' ***/
27 .mblFormLayout.mblFormLayoutSingleCol fieldset {
28 padding-left: 0;
29 padding-right: 0;
30 }
31
32 /* A gap between rows */
33 .mblFormLayout.mblFormLayoutSingleCol > * + * {
34 margin-top: 0.6em;
35 }
36
37 /* Text widgets */
38 .mblFormLayout.mblFormLayoutSingleCol .mblTextArea,
39 .mblFormLayout.mblFormLayoutSingleCol .mblExpandingTextArea,
40 .mblFormLayout.mblFormLayoutSingleCol .mblTextBox,
41 .mblFormLayout.mblFormLayoutSingleCol .mblSearchBox{
42 width: 100%;
43 box-sizing: border-box;
44 }
45
46
47 /* Two Columns Layout */
48 /**********************************************************************************************************************/
49
50 /*** columns == 'auto' ***/
51 @media all and (min-width: 500px) {
52 /* Form layout selector*/
53 .mblFormLayout.mblFormLayoutAuto {
54 display: table;
55 width: 100%;
56 }
57
58 /* Form rows */
59 .mblFormLayout.mblFormLayoutAuto > * {
60 display: table-row;
61 }
62 /* Form cells */
63 .mblFormLayout.mblFormLayoutAuto > * > * {
64 display: table-cell;
65 vertical-align: top;
66 padding: 0.5em 0;
67 }
68
69 /* Left cells */
70 .mblFormLayout.mblFormLayoutAuto > * > *:first-child {
71 width:20%;
72 padding-right: 0.5em;
73 }
74
75 /* mblFormLayoutRightAlign optional selector definition */
76 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child {
77 text-align: right;
78 }
79
80 /* Force right margin of last elements of the right column, no way to select elements followed by a <br> */
81 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblButton:last-child,
82 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblToggleButton:last-child,
83 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblCheckBox:last-child,
84 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblSwitch:last-child,
85 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblRadioButton:last-child,
86 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblTextArea:last-child,
87 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblExpandingTextArea:last-child,
88 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblTextBox:last-child,
89 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblSearchBox:last-child {
90 margin-right: 0;
91 }
92
93 /* The Slider sticks to its bounds when margin=10px */
94 .mblFormLayout.mblFormLayoutAuto.mblFormLayoutRightAlign > * > *:last-child > .mblSlider:last-child {
95 display: inline-block;
96 margin-right: 10px;
97 margin-top: 0px;
98 }
99
100 /* Text widgets */
101 .mblFormLayout.mblFormLayoutAuto .mblTextArea,
102 .mblFormLayout.mblFormLayoutAuto .mblExpandingTextArea,
103 .mblFormLayout.mblFormLayoutAuto .mblTextBox,
104 .mblFormLayout.mblFormLayoutAuto .mblSearchBox{
105 width: 50%;
106 box-sizing: border-box;
107 }
108 }
109
110 /*** columns == 'two' ***/
111
112 /* Form layout selector*/
113 .mblFormLayout.mblFormLayoutTwoCol {
114 display: table;
115 width: 100%;
116 }
117
118 /* Form rows */
119 .mblFormLayout.mblFormLayoutTwoCol > * {
120 display: table-row;
121 }
122 /* Form cells */
123 .mblFormLayout.mblFormLayoutTwoCol > * > * {
124 display: table-cell;
125 vertical-align: top;
126 padding: 0.5em 0;
127 }
128
129 /* Left cells */
130 .mblFormLayout.mblFormLayoutTwoCol > * > *:first-child {
131 width:20%;
132 padding-right: 0.5em;
133 }
134
135 /* mblFormLayoutRightAlign optional selector definition */
136 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child {
137 text-align: right;
138 }
139
140 /* Force right margin of last elements of the right column, no way to select elements followed by a <br> */
141 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblButton:last-child,
142 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblToggleButton:last-child,
143 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblCheckBox:last-child,
144 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblSwitch:last-child,
145 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblRadioButton:last-child,
146 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblTextArea:last-child,
147 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblExpandingTextArea:last-child,
148 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblTextBox:last-child,
149 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblSearchBox:last-child {
150 margin-right: 0;
151 }
152
153 /* The Slider sticks to its bounds when margin=10px */
154 .mblFormLayout.mblFormLayoutTwoCol.mblFormLayoutRightAlign > * > *:last-child > .mblSlider:last-child {
155 display: inline-block;
156 margin-right: 10px;
157 margin-top: 0px;
158 }
159
160 /* Text widgets */
161 .mblFormLayout.mblFormLayoutTwoCol .mblTextArea,
162 .mblFormLayout.mblFormLayoutTwoCol .mblExpandingTextArea,
163 .mblFormLayout.mblFormLayoutTwoCol .mblTextBox,
164 .mblFormLayout.mblFormLayoutTwoCol .mblSearchBox{
165 width: 50%;
166 box-sizing: border-box;
167 }
168
169 /* Common Rules*/
170 /**********************************************************************************************************************/
171
172 .mblFormLayout fieldset {
173 border: none;
174 margin: 0;
175 }
176
177 /* Bold widget labels */
178 .mblFormLayout > * > *:first-child {
179 font-weight: bold;
180 }
181
182 /* Whatever the screen width, force left margin of first elements and elements following a <br> */
183 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblButton:first-child,
184 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblToggleButton:first-child,
185 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblCheckBox:first-child,
186 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblSwitch:first-child,
187 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblRadioButton:first-child,
188 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblTextArea:first-child,
189 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblExpandingTextArea:first-child,
190 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblTextBox:first-child,
191 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblSearchBox:first-child,
192 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblButton,
193 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblToggleButton,
194 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblCheckBox,
195 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblSwitch,
196 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblRadioButton,
197 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblTextArea,
198 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblExpandingTextArea,
199 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblTextBox,
200 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > br + .mblSearchBox {
201 margin-left: 0;
202 }
203
204 /* The Slider sticks to its bounds when margin=10px */
205 .mblFormLayout:not(.mblFormLayoutRightAlign) > * > *:last-child > .mblSlider:first-child {
206 display: inline-block;
207 margin-left: 10px;
208 margin-top: 0;
209 margin-bottom: 0;
210 }