Debian Codegraph @

dijit-themes/flat/dijit/Dialog.styl

raw
1 /* Dialog
2 *
3 * Styling Dialog includes two sections: Dialog and Tooltip & TooltipDialog
4 *
5 * Dialog:
6 * 1. Dialog (default styling):
7 * .dijitDialog - styles for dialog's bounding box
8 *
9 * 2. Dialog title
10 * .dijitDialogTitleBar - styles for the title container at the top of dialog
11 * .dijitDialogTitle - the text container in dialog title
12 *
13 * 3. Dialog content
14 * .dijitDialogPaneContent - main container for content area and action bar
15 * .dijitDialogPaneContentArea - styles for content container
16 *
17 * 4. Dialog action bar
18 * .dijitDialogPaneActionBar - styles for action buttons lie at the bottom of dialog pane content
19 *
20 * 5. Dialog underlay
21 * .dijitDialogUnderlay - div under the dialog which used for separate dialog and page content
22 *
23 *
24 * Tooltip & TooltipDialog:
25 * 1. tooltip content container:
26 * .dijitTooltipContainer - tooltip content container
27 *
28 * 2. tooltip connector:
29 * .dijitTooltipConnector - tooltip anchor includes 4 direction(up, down, left, right)
30 */
31
32 @import 'dijit_variables';
33
34 .{$theme-name} {
35
36 /* ----- Dialog ----- */
37
38 .dijitDialog {
39 background-color: $dialog-background-color;
40 border: 1px solid $dialog-border-color;
41 border-radius: $dialog-border-radius;
42 box-shadow: $dialog-box-shadow;
43 }
44
45 /* content pane */
46
47 .dijitDialogPaneContent {
48 background-color: $dialog-content-bg-color;
49 border-radius: 0 0 $dialog-border-radius $dialog-border-radius;
50 padding: $dialog-padding;
51 position: relative;
52 }
53
54 /* action bar */
55
56 .dijitDialogPaneActionBar {
57 /* the bar at bottom with OK/Cancel buttons */
58 padding-top: $dialog-padding;
59 text-align: right;
60 position: relative;
61 .dijitButton {
62 float: none;
63 }
64 }
65
66 /* action bar within a TooltipDialog */
67 .dijitTooltipDialog .dijitDialogPaneActionBar {
68 border-radius: 0 0 $dialog-border-radius $dialog-border-radius
69 margin: $dialog-padding 0 0;
70 }
71
72 /* title bar */
73
74 .dijitDialogTitleBar {
75 /* outer container for the titlebar of the dialog */
76 line-height: $line-height;
77 border-bottom: 1px solid $dialog-titlebar-border-color;
78 padding: $dialog-padding $dialog-padding * 1.5;
79 border-radius: $dialog-border-radius $dialog-border-radius 0 0;
80 }
81
82 .dijitDialogTitle {
83 /* typography and styling of the dialog title */
84 font-size: $dialog-titlebar-font-size;
85 font-weight: bold;
86 }
87
88 /* close button */
89
90 .dijitDialogCloseIcon {
91 /* the default close icon for the dialog */
92 width: $dialog-close-icon-size;
93 height: @width;
94 line-height: @height;
95 text-align: center;
96 position: absolute;
97 top: ($line-height + $dialog-padding * 2 - 20px ) * 0.5;
98 right: $dialog-padding * 1.5;
99 _icon-core-style();
100 opacity: 0.65;
101
102 &:before {
103 content: $dialog-close-icon;
104 font-size: $dialog-close-icon-size;
105 }
106
107 .closeText {
108 display: none;
109 }
110 }
111
112 .dijitDialogCloseIconHover,
113 .dijitDialogCloseIconActive {
114 opacity: 1;
115 }
116
117 /* underlay */
118
119 .dijitDialogUnderlay {
120 background: $dialog-underlay-color;
121 opacity: $dialog-underlay-opacity;
122 }
123
124 /* ----- Tooltip and TooltipDialog ----- */
125
126 .dijitTooltip,
127 .dijitTooltipDialog {
128 /* the outermost dom node, holding the connector and container */
129 background: transparent; /* make the area on the sides of the arrow transparent */
130 }
131
132 .dijitTooltipContainer {
133 background-color: $tooltip-background-color;
134 opacity: $tooltip-opacity;
135 padding: $tooltip-padding $tooltip-padding * 2;
136 border-radius: $tooltip-border-radius;
137 }
138
139 .dijitTooltip .dijitTooltipContainer {
140 color: $tooltip-text-color;
141 border: $tooltip-border;
142 }
143
144 .dijitTooltipConnector {
145 /* the arrow */
146 z-index: 2;
147 width:auto;
148 height:auto;
149 opacity: $tooltip-opacity;
150 }
151
152 .dijitTooltipABRight .dijitTooltipConnector {
153 /* above or below tooltip, but the arrow appears on the right,
154 and the right edges of target and tooltip are aligned rather than the left */
155 left: auto !important;
156 right: $tooltip-padding * 2;
157 }
158
159 .dijitTooltipBelow {
160 /* leave room for arrow above content */
161 padding-top: $tooltip-arrow-thickness;
162
163 .dijitTooltipConnector {
164 /* the arrow piece for tooltips below an element */
165 top: 0;
166 left: $tooltip-padding * 2;
167 border-bottom: $tooltip-arrow-thickness solid $tooltip-arrow-color;
168 border-left: $tooltip-arrow-thickness solid transparent;
169 border-right: $tooltip-arrow-thickness solid transparent;
170 border-top: 0;
171 }
172 }
173
174 .dijitTooltipAbove {
175 /* leave room for arrow below content */
176 padding-bottom: $tooltip-arrow-thickness;
177
178 .dijitTooltipConnector {
179 /* the arrow piece for tooltips above an element */
180 bottom: 0;
181 left: $tooltip-padding * 2;
182 border-top: $tooltip-arrow-thickness solid $tooltip-arrow-color;
183 border-left: $tooltip-arrow-thickness solid transparent;
184 border-right: $tooltip-arrow-thickness solid transparent;
185 border-bottom: 0;
186 }
187 }
188
189 .dijitTooltipLeft {
190 padding-right: $tooltip-arrow-thickness;
191
192 .dijitTooltipConnector {
193 /* the arrow piece for tooltips to the left of an element, bottom borders aligned */
194 right: 0;
195 border-left: $tooltip-arrow-thickness solid $tooltip-arrow-color;
196 border-bottom: $tooltip-arrow-thickness solid transparent;
197 border-top: $tooltip-arrow-thickness solid transparent;
198 border-right: 0;
199 }
200 }
201
202 .dijitTooltipRight {
203 padding-left: $tooltip-arrow-thickness;
204
205 .dijitTooltipConnector {
206 /* the arrow piece for tooltips to the right of an element, bottom borders aligned */
207 left: 0;
208 border-bottom: $tooltip-arrow-thickness solid transparent;
209 border-top: $tooltip-arrow-thickness solid transparent;
210 border-right: $tooltip-arrow-thickness solid $tooltip-arrow-color;
211 }
212 }
213
214 /* ----- TooltipDialog ----- */
215
216 .dijitTooltipDialog {
217 .dijitTooltipContainer {
218 background: $dialog-background-color;
219 border: 1px solid $dialog-border-color;
220 border-radius: $dialog-border-radius;
221 box-shadow: $dialog-box-shadow;
222 opacity:1;
223 }
224 &.dijitTooltipBelow {
225 padding-top: $dialog-arrow-thickness;
226 }
227 &.dijitTooltipAbove {
228 padding-bottom: $dialog-arrow-thickness;
229 }
230 &.dijitTooltipLeft {
231 padding-right: $dialog-arrow-thickness;
232 }
233 &.dijitTooltipRight {
234 padding-left: $dialog-arrow-thickness;
235 }
236
237 /* The tooltip dialog's connector itself serves as the "border" of the arrows,*/
238 /* then using :after to overlay the connector to "fill" the arrows with the same color as the container. */
239 .dijitTooltipConnector {
240 height: 0;
241 width: 0;
242 position: absolute;
243 z-index: 2;
244 opacity: 1;
245
246 &:after {
247 content: "";
248 height: 0;
249 width: 0;
250 position: absolute;
251 }
252 }
253
254 &.dijitTooltipAbove .dijitTooltipConnector {
255 border-color: $dialog-arrow-border-color transparent transparent;
256 border-width: $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px 0; /* one extra pixel is added as the border of the arrows */;
257 border-style: solid;
258
259 &:after {
260 border-color: $dialog-arrow-background-color transparent transparent;
261 border-width: $dialog-arrow-thickness $dialog-arrow-thickness 0;
262 border-style: solid;
263 left: - $dialog-arrow-thickness;
264 top: - $dialog-arrow-thickness - 1px;
265 }
266 }
267 &.dijitTooltipBelow .dijitTooltipConnector {
268 border-color: transparent transparent $dialog-arrow-border-color;
269 border-width: 0 $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px;
270 border-style: solid;
271
272 &:after {
273 border-color: transparent transparent $dialog-arrow-background-color;
274 border-width: 0 $dialog-arrow-thickness $dialog-arrow-thickness;
275 border-style: solid;
276 left: - $dialog-arrow-thickness;
277 bottom: - $dialog-arrow-thickness - 1px;
278 }
279 }
280 &.dijitTooltipLeft .dijitTooltipConnector {
281 border-color: transparent transparent transparent $dialog-arrow-border-color;
282 border-width: $dialog-arrow-thickness + 1px 0 $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px;
283 border-style: solid;
284
285 &:after {
286 border-color: transparent transparent transparent $dialog-arrow-background-color;
287 border-width: $dialog-arrow-thickness 0 $dialog-arrow-thickness $dialog-arrow-thickness;
288 border-style: solid;
289 top: - $dialog-arrow-thickness;
290 left: - $dialog-arrow-thickness - 1px;
291 }
292 }
293 &.dijitTooltipRight .dijitTooltipConnector {
294 border-color: transparent $dialog-arrow-border-color transparent transparent;
295 border-width: $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px 0;
296 border-style: solid;
297
298 &:after {
299 border-color: transparent $dialog-arrow-background-color transparent transparent;
300 border-width: $dialog-arrow-thickness $dialog-arrow-thickness $dialog-arrow-thickness 0;
301 border-style: solid;
302 top: - $dialog-arrow-thickness;
303 right: - $dialog-arrow-thickness - 1px;
304 }
305 }
306 }
307
308 }