summaryrefslogtreecommitdiff
path: root/lib/flat/dijit/Dialog.styl
blob: 2c869bda4535801951929ca4fb2903bfebd365f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
/* Dialog 
 * 
 * Styling Dialog includes two sections: Dialog and Tooltip & TooltipDialog
 * 
 * Dialog:
 * 1. Dialog (default styling): 
 * 		.dijitDialog - styles for dialog's bounding box
 *
 * 2. Dialog title 
 * 		.dijitDialogTitleBar - styles for the title container at the top of dialog
 * 		.dijitDialogTitle - the text container in dialog title
 * 
 * 3. Dialog content 
 * 		.dijitDialogPaneContent - main container for content area and action bar
 * 		.dijitDialogPaneContentArea - styles for content container
 * 
 * 4. Dialog action bar 
 * 		.dijitDialogPaneActionBar - styles for action buttons lie at the bottom of dialog pane content
 * 
 * 5. Dialog underlay 
 * 		.dijitDialogUnderlay - div under the dialog which used for separate dialog and page content
 * 
 * 
 * Tooltip & TooltipDialog:
 * 1. tooltip content container: 
 * 		.dijitTooltipContainer - tooltip content container
 *
 * 2. tooltip connector: 
 * 		.dijitTooltipConnector - tooltip anchor includes 4 direction(up, down, left, right)
 */

@import 'dijit_variables';

.{$theme-name} {
		
	/* ----- Dialog ----- */
	
	.dijitDialog {
		background-color: $dialog-background-color;
		border: 1px solid $dialog-border-color;
		border-radius: $dialog-border-radius;
		box-shadow: $dialog-box-shadow;
	}

	/* content pane */

	.dijitDialogPaneContent {
		background-color: $dialog-content-bg-color;
		border-radius: 0 0 $dialog-border-radius $dialog-border-radius;
		padding: $dialog-padding;
		position: relative;
	}

	/* action bar */

	.dijitDialogPaneActionBar {
		/* the bar at bottom with OK/Cancel buttons */
		padding-top: $dialog-padding;
		text-align: right;
		position: relative;
		.dijitButton {
			float: none;
		}
	}

	/* action bar within a TooltipDialog */
	.dijitTooltipDialog .dijitDialogPaneActionBar {
		border-radius: 0 0 $dialog-border-radius $dialog-border-radius
		margin: $dialog-padding  0 0;
	}

	/* title bar */

	.dijitDialogTitleBar {
		/* outer container for the titlebar of the dialog */
		line-height: $line-height;
		border-bottom: 1px solid $dialog-titlebar-border-color;
		padding: $dialog-padding $dialog-padding * 1.5;
		border-radius: $dialog-border-radius $dialog-border-radius 0 0;
	}

	.dijitDialogTitle {
		/* typography and styling of the dialog title */
		font-size: $dialog-titlebar-font-size;
		font-weight: bold;
	}

	/* close button */
	
	.dijitDialogCloseIcon {
		/* the default close icon for the dialog */
		width: $dialog-close-icon-size;
		height: @width;
		line-height: @height;
		text-align: center;
		position: absolute;
		top: ($line-height + $dialog-padding * 2 - 20px ) * 0.5;
		right: $dialog-padding * 1.5;
		_icon-core-style();
		opacity: 0.65;
		
		&:before {
			content: $dialog-close-icon;
			font-size: $dialog-close-icon-size;
		}

		.closeText {
			display: none;
		}
	}

	.dijitDialogCloseIconHover,
	.dijitDialogCloseIconActive {
		opacity: 1;
	}

	/* underlay */
		
	.dijitDialogUnderlay {
		background: $dialog-underlay-color;
		opacity: $dialog-underlay-opacity;
	}

	/* ----- Tooltip and TooltipDialog ----- */

	.dijitTooltip,
	.dijitTooltipDialog {
		/* the outermost dom node, holding the connector and container */
		background: transparent; /* make the area on the sides of the arrow transparent */
	}

	.dijitTooltipContainer {
		background-color: $tooltip-background-color;
		opacity: $tooltip-opacity;
		padding: $tooltip-padding $tooltip-padding * 2;
		border-radius: $tooltip-border-radius;
	} 

	.dijitTooltip .dijitTooltipContainer {
		color: $tooltip-text-color;
		border: $tooltip-border;
	}

	.dijitTooltipConnector {
		/* the arrow */
		z-index: 2;
		width:auto;
		height:auto;
		opacity: $tooltip-opacity;
	}

	.dijitTooltipABRight .dijitTooltipConnector {
		/* above or below tooltip, but the arrow appears on the right,
			and the right edges of target and tooltip are aligned rather than the left */
		left: auto !important;
		right: $tooltip-padding * 2;
	}

	.dijitTooltipBelow {
		/* leave room for arrow above content */
		padding-top: $tooltip-arrow-thickness;

		.dijitTooltipConnector {
			/* the arrow piece for tooltips below an element */
			top: 0;
			left: $tooltip-padding * 2;
			border-bottom: $tooltip-arrow-thickness solid $tooltip-arrow-color;
			border-left: $tooltip-arrow-thickness solid transparent;
			border-right: $tooltip-arrow-thickness solid transparent;
			border-top: 0;
		}
	}

	.dijitTooltipAbove {
		/* leave room for arrow below content */
		padding-bottom: $tooltip-arrow-thickness;

		.dijitTooltipConnector {
			/* the arrow piece for tooltips above an element */
			bottom: 0;
			left: $tooltip-padding * 2;
			border-top: $tooltip-arrow-thickness solid $tooltip-arrow-color;
			border-left: $tooltip-arrow-thickness solid transparent;
			border-right: $tooltip-arrow-thickness solid transparent;
			border-bottom: 0;
		}
	}

	.dijitTooltipLeft {
		padding-right: $tooltip-arrow-thickness;

		.dijitTooltipConnector {
			/* the arrow piece for tooltips to the left of an element, bottom borders aligned */
			right: 0;
			border-left: $tooltip-arrow-thickness solid $tooltip-arrow-color;
			border-bottom: $tooltip-arrow-thickness solid transparent;
			border-top: $tooltip-arrow-thickness solid transparent;
			border-right: 0;
		}
	}

	.dijitTooltipRight {
		padding-left: $tooltip-arrow-thickness;

		.dijitTooltipConnector {
			/* the arrow piece for tooltips to the right of an element, bottom borders aligned */
			left: 0;
			border-bottom: $tooltip-arrow-thickness solid transparent;
			border-top: $tooltip-arrow-thickness solid transparent;
			border-right: $tooltip-arrow-thickness solid $tooltip-arrow-color;
		}
	}

	/* ----- TooltipDialog ----- */

	.dijitTooltipDialog {
		.dijitTooltipContainer {
			background: $dialog-background-color;
			border: 1px solid $dialog-border-color;
			border-radius: $dialog-border-radius;
			box-shadow: $dialog-box-shadow;
			opacity:1;
		}
		&.dijitTooltipBelow {
			padding-top: $dialog-arrow-thickness;
		}
		&.dijitTooltipAbove {
			padding-bottom: $dialog-arrow-thickness;
		}
		&.dijitTooltipLeft {
			padding-right: $dialog-arrow-thickness;
		}
		&.dijitTooltipRight {
			padding-left: $dialog-arrow-thickness;
		}

		/* The tooltip dialog's connector itself serves as the "border" of the arrows,*/
		/* then using :after to overlay the connector to "fill" the arrows with the same color as the container. */
		.dijitTooltipConnector {
			height: 0;
			width: 0;
			position: absolute;
			z-index: 2;
			opacity: 1;

			&:after {
				content: "";
				height: 0;
				width: 0;
				position: absolute;
			}
		}

		&.dijitTooltipAbove .dijitTooltipConnector {
			border-color: $dialog-arrow-border-color transparent transparent;
			border-width: $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px 0; /* one extra pixel is added as the border of the arrows */;
			border-style: solid;

			&:after {
				border-color: $dialog-arrow-background-color transparent transparent;
				border-width: $dialog-arrow-thickness $dialog-arrow-thickness 0;
				border-style: solid;
				left: - $dialog-arrow-thickness;
				top: - $dialog-arrow-thickness - 1px;
			}
		}
		&.dijitTooltipBelow .dijitTooltipConnector {
			border-color: transparent transparent $dialog-arrow-border-color;
			border-width: 0 $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px;
			border-style: solid;

			&:after {
				border-color: transparent transparent $dialog-arrow-background-color;
				border-width: 0 $dialog-arrow-thickness $dialog-arrow-thickness;
				border-style: solid;
				left: - $dialog-arrow-thickness;
				bottom: - $dialog-arrow-thickness - 1px;
			}
		}
		&.dijitTooltipLeft .dijitTooltipConnector {
			border-color: transparent transparent transparent $dialog-arrow-border-color;
			border-width: $dialog-arrow-thickness + 1px 0 $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px;
			border-style: solid;

			&:after {
				border-color: transparent transparent transparent $dialog-arrow-background-color;
				border-width: $dialog-arrow-thickness 0 $dialog-arrow-thickness $dialog-arrow-thickness;
				border-style: solid;
				top: - $dialog-arrow-thickness;
				left: - $dialog-arrow-thickness - 1px;
			}
		}
		&.dijitTooltipRight .dijitTooltipConnector {
			border-color: transparent $dialog-arrow-border-color transparent transparent;
			border-width: $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px $dialog-arrow-thickness + 1px 0;
			border-style: solid;

			&:after {
				border-color: transparent $dialog-arrow-background-color transparent transparent;
				border-width: $dialog-arrow-thickness $dialog-arrow-thickness $dialog-arrow-thickness 0;
				border-style: solid;
				top: - $dialog-arrow-thickness;
				right: - $dialog-arrow-thickness - 1px;
			}
		}
	}
	
}