##// END OF EJS Templates
- Fixed CSS so it also applies to widgets within modals...
Jonathan Frederic -
Show More
@@ -1,233 +1,241 b''
1 1
2 2 /*
3 3 LESS file that styles IPython notebook widgets and the area they sit in.
4 4
5 5 The widget area typically looks something like this:
6 6 +------------------------------------------+
7 7 | widget-area |
8 8 | +--------+---------------------------+ |
9 9 | | prompt | widget-subarea | |
10 10 | | | +--------+ +--------+ | |
11 11 | | | | widget | | widget | | |
12 12 | | | +--------+ +--------+ | |
13 13 | +--------+---------------------------+ |
14 14 +------------------------------------------+
15 15 */
16 16
17 17 .widget-area {
18 18 page-break-inside: avoid;
19 19 .hbox();
20 20
21 21 .widget-subarea {
22 22 padding: 0.44em 0.4em 0.4em 1px;
23 23 margin-left: 6px;
24 24 .border-box-sizing();
25 25 .vbox();
26 26 .box-flex2();
27 }
28 }
29
30 /* THE CLASSES BELOW CAN APPEAR ANYWHERE IN THE DOM */
27 31
28 32 /* Horizontal Label */
29 33 .widget-hlabel {
30 34 min-width: 10ex;
31 35 padding-right: 8px;
32 36 padding-top: 3px;
33 37 text-align: right;
34 38 vertical-align: text-top;
35 39 }
36 40
37 41 /* Vertical Label */
38 42 .widget-vlabel {
39 43 padding-bottom: 5px;
40 44 text-align: center;
41 45 vertical-align: text-bottom;
42 46 }
43 47
44 48
45 49 /* Slider Track */
46 50 .slide-track {
47 51 border: 1px solid #CCCCCC;
48 52 background: #FFFFFF;
49 53 .corner-all(); /* Round the corners of the slide track */
50 54 }
51 55
52 56 /* Horizontal jQuery Slider
53 57
54 58 Both the horizontal and vertical versions of the slider are characterized
55 59 by a styled div that contains an invisible jQuery slide div which
56 60 contains a visible slider handle div. This is requred so we can control
57 61 how the slider is drawn and 'fix' the issue where the slide handle
58 62 doesn't stop at the end of the slide.
59 63
60 64 Both horizontal and vertical sliders have this div nesting:
61 65 +------------------------------------------+
62 66 | widget-(h/v)slider |
63 67 | +--------+---------------------------+ |
64 68 | | ui-slider | |
65 69 | | +------------------+ | |
66 70 | | | ui-slider-handle | | |
67 71 | | +------------------+ | |
68 72 | +--------+---------------------------+ |
69 73 +------------------------------------------+
70 74 */
71 75 .widget-hslider {
72 76
73 77 /* Fix the padding of the slide track so the ui-slider is sized
74 78 correctly. */
75 79 padding-left: 8px;
76 80 padding-right: 5px;
77 81 overflow: visible;
78 82
79 83 /* Default size of the slider */
80 84 width: 348px;
81 85 height: 5px;
82 86 max-height: 5px;
83 87 margin-top: 11px;
84 88
85 89 /* Style the slider track */
86 90 .slide-track();
87 91
88 92 /* Make the div a flex box (makes FF behave correctly). */
89 93 .hbox();
90 94
91 95 /* Inner, invisible slide div */
92 96 .ui-slider {
93 97 border: 0px !important;
94 98 background: none !important;
95 99
96 100 .hbox();
97 101 .box-flex1();
98 102
99 103 .ui-slider-handle {
100 104 width: 14px !important;
101 105 height: 28px !important;
102 106
103 107 margin-top: -8px !important;
104 108 }
105 109 }
106 110 }
107 111
108 112 /* Vertical jQuery Slider */
109 113 .widget-vslider {
110 114
111 115 /* Fix the padding of the slide track so the ui-slider is sized
112 116 correctly. */
113 117 padding-bottom: 8px;
114 118 overflow: visible;
115 119
116 120 /* Default size of the slider */
117 121 width: 5px;
118 122 max-width: 5px;
119 123 height: 250px;
120 124 margin-left: 12px;
121 125
122 126 /* Style the slider track */
123 127 .slide-track();
124 128
125 129 /* Make the div a flex box (makes FF behave correctly). */
126 130 .vbox();
127 131
128 132 /* Inner, invisible slide div */
129 133 .ui-slider {
130 134 border: 0px !important;
131 135 background: none !important;
132 136 margin-left: -4px;
133 137 margin-top: 5px;
134 138
135 139 .vbox();
136 140 .box-flex1();
137 141
138 142 .ui-slider-handle {
139 143 width: 28px !important;
140 144 height: 14px !important;
141 145 margin-left: -9px;
142 146 }
143 147 }
144 148 }
145 149
146 150 /* String Textbox - used for TextBoxView and TextAreaView */
147 151 .widget-text {
148 152 width: 350px;
149 153 margin-bottom: 0px;
150 154 }
151 155
152 156 /* Listbox */
153 157 .widget-listbox {
154 158 width: 364px;
155 159 margin-bottom: 0px;
156 160 }
157 161
158 162 /* Single Line Textbox - used for IntTextView and FloatTextView */
159 163 .widget-numeric-text {
160 164 width: 150px;
161 165 }
162 166
163 167 /* Progress Bar */
164 168 .widget-progress {
165 169 width: 363px;
166 170
167 171 /* Disable progress bar animation */
168 172 .bar {
169 173 -webkit-transition: none;
170 174 -moz-transition: none;
171 175 -ms-transition: none;
172 176 -o-transition: none;
173 177 transition: none;
174 178 }
175 179 }
176 180
177 181 /* ComboBox Main Button */
178 182 .widget-combo-btn {
179 183 min-width: 138px; /* + 26px drop arrow btn = 164px */
180 184 }
181 185
182 186 /* The following section sets the style for the invisible div that
183 187 hold widgets and their accompanying labels.
184 188
185 189 Looks like this:
186 190 +-----------------------------+
187 191 | widget-box (or similar) |
188 192 | +-------+---------------+ |
189 193 | | Label | Actual Widget | |
190 194 | +-------+---------------+ |
191 195 +-----------------------------+
192 196 */
193 197 .widget-box {
194 198 .start();
195 199 .widget-container();
196 200 margin: 5px;
197 201 }
198 202 .widget-hbox { /* Horizontal widgets */
199 203 .widget-box();
200 204 .hbox();
201 205 }
202 206 .widget-hbox-single { /* Single line horizontal widgets */
203 207 .widget-hbox();
204 208 height: 30px;
205 209 }
206 210 .widget-vbox-single { /* For vertical slides */
207 211 .widget-box();
208 212 .vbox();
209 213 width: 30px;
210 214 }
211 }
212 }
213
214 /* THE CLASSES BELOW CAN APPEAR ANYWHERE IN THE DOM */
215
216 215 /* ContainerWidget - ModalView */
217 216 .widget-modal {
218 217 overflow: hidden;
219 218 position: absolute !important;
220 219 top: 0px;
221 220 left: 0px;
222 221 margin-left: 0px !important;
223 222 }
224 223
225 224 /* ContainerWidget - ModalView Body */
226 225 .widget-modal-body {
227 226 max-height: none !important;
228 227 }
229 228
230 229 /* ContainerWidget */
231 230 .widget-container {
232 231 .border-box-sizing();
233 232 }
233
234 /* Horizontal Label */
235 .docked-widget-modal {
236 overflow: hidden;
237 position: relative !important;
238 top: 0px !important;
239 left: 0px !important;
240 margin-left: 0px !important;
241 }
General Comments 0
You need to be logged in to leave comments. Login now