Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / sass / _common.scss @ ceaaa3be

History | View | Annotate | Download (9.6 kB)

1
/* Table of Contents
2

    
3
  - Clearfix
4
  - Mixins
5
  - Buttons and Links
6
  - Layout 
7
  - Header
8
  - Actions Bar
9
  - Icon Navigation
10
  - Top Info
11
  - Progress Bar
12
  - Responsive
13

    
14
 */
15

    
16
/* Clearfix -------------------------------------------- */
17

    
18
.clearfix {
19
    zoom:1;
20
    &:before, &:after {
21
        content: "\0020";
22
        display: block;
23
        height: 0;
24
        overflow: hidden;
25
    }
26
    &:after {
27
        clear: both;
28
    }
29
}
30

    
31
/* Mixins ----------------------------------------------- */
32

    
33
@mixin marginPaddingZero() {
34
	margin: 0;
35
	padding: 0;
36
}
37
 
38

    
39
// Establishes the prequisits for sprite with background-image.
40
// Background-position for normal and hover states need to 
41
// be declared separetely
42
@mixin sprite($image, $width, $height){
43
	background:url($image) no-repeat center center;
44
	width: $width;
45
	height:$height;
46
	display: inline-block;
47
	text-indent: -2000px;
48
	overflow: hidden;
49

    
50
}
51

    
52
// Transition for css properties
53
@mixin transition($transition-property, $transition-time, $method) {
54
	-webkit-transition: $transition-property $transition-time $method;
55
	-moz-transition: $transition-property $transition-time $method;
56
	-ms-transition: $transition-property $transition-time $method;
57
	-o-transition: $transition-property $transition-time $method;
58
	transition: $transition-property $transition-time $method;
59
}
60

    
61
// Box-shadow property. For no box-shadow use box-shadow(none)
62
@mixin box-shadow($shadows...) {
63
  -moz-box-shadow: $shadows;
64
  -webkit-box-shadow: $shadows;
65
  box-shadow: $shadows;
66
}
67

    
68
@mixin placeholder {
69
	&.placeholder { @content; }
70
	&:-moz-placeholder { @content; }
71
	&::-moz-placeholder { @content; }
72
	&::-webkit-input-placeholder { @content; }
73
}
74

    
75
// keyframes mixin
76
@mixin keyframes($name) {
77
  @-webkit-keyframes #{$name} {
78
    @content;
79
  }
80
  @-moz-keyframes #{$name} {
81
    @content;
82
  }
83
  @-ms-keyframes #{$name} {
84
    @content;
85
  }
86
  @keyframes #{$name} {
87
    @content;
88
  }
89
}
90
/* Circle and Tags ----------------------------------------------- */
91
.circle {
92
	display:inline-block;
93
    -webkit-border-radius: 999px;
94
    -moz-border-radius: 999px;
95
    border-radius: 999px;
96
    behavior: url(PIE.htc);
97
}
98

    
99
.tags {
100
	text-align:center;
101
	a {
102
		@extend .circle;
103
		width:12px;
104
		height:12px;
105
		margin:0 3px;
106
		&.tag1 { background-color:$error-color;}
107
		&.tag2 { background-color:$success-color;}
108
		&.tag3 { background-color:$alert-color;}
109
	}
110
}
111

    
112
.tag-demo {
113
	@extend .circle;
114
	width: 18px;
115
	height: 18px;
116
	position: relative;
117
	bottom: -5px;
118
	margin-right: 20px;
119

    
120
	//temp
121
	&.tag4 { background-color: #ff5e4d;}
122
	&.tag5 { background-color: #25bfda;}
123
	&.tag6 { background-color: #fbf7c5;}
124
	&.tag7 { background-color: #83a697;}
125
}
126

    
127

    
128

    
129
/* Buttons and Links ----------------------------------------------- */
130

    
131

    
132
a {
133
	color:$link-color;
134
	&:hover, &.current, &.active  {
135
		color:$link-color-hover;
136
		@include transition(background, 300ms, ease-out);
137
	}
138

    
139
	
140
}
141

    
142
.inactive {
143
	color:$inactive-color!important;
144
	&:hover {
145
		color:$inactive-color;
146
		cursor:default;
147
	}
148
}
149

    
150

    
151
.btn1 {
152
	border:1px solid $primary-color;
153
	color:$primary-color;
154
	display:inline-block;
155
	padding:10px 20px;
156
	line-height:1em;
157
	text-align:center;
158
	&:hover,
159
	&.current,
160
	&:focus {
161
		border-color:$secondary-color;
162
		background:$secondary-color;
163
		color:#fff;
164
	}
165
	&.current {
166
		cursor:default;
167
	}
168
}
169

    
170
.btn2 {
171
	@extend .btn1;
172
	color:$secondary-color;
173
	background:#fff;
174
	border-color:$secondary-color;
175
	&:hover, 
176
	&.current,
177
	&:focus {
178
		background:transparent;
179
		border-color:#fff;
180
	}
181
}
182

    
183
.btn3 {
184
	@extend .btn1;
185
	color:#fff; 
186
	border-color:#fff;
187
	&:hover, 
188
	&.current,
189
	&:focus {
190
		color:$secondary-color;
191
		background:#fff;
192
		border-color:#fff;
193
	}
194
}
195

    
196
.btn4 {
197
	@extend .btn1;
198
	color:#fff; 
199
	border-color:#fff;
200
	background: $secondary-color;
201
	&:hover, 
202
	&.current,
203
	&:focus {
204
		color: $secondary-color;
205
  		border-color:  $secondary-color;
206
  		background: #fff;
207
	}
208
}
209

    
210
.btn5 {
211
	border:1px solid white;
212
	color:white;
213
	display:inline-block;
214
	padding:0 20px;
215
	line-height:$btn-height - 2px;
216
	height:$btn-height;
217
	text-align:center;
218
	font-size:emCalc(12px);
219
	&:hover,
220
	&:focus {
221
		border-width:2px;
222
		line-height: $btn-height - 4px;
223
		padding:0 19px;
224
		color:white;
225
	}
226
	&.current {
227
		background:white;
228
		color:$secondary-color;
229
	}
230
}
231

    
232
.btn-img {
233
	@extend .btn1;
234
	border-color:$secondary-color;
235
	&:hover,
236
	&:focus {
237
		background:transparent;
238
	}
239
	a {
240
		img,span {
241
			margin-left:5px;
242
		}
243
	}
244
}
245

    
246

    
247
/* Layout ----------------------------------------------- */
248
html,body {
249
	height:100%;
250
}
251

    
252
body {
253
	padding-top:$header-height+$bar-height;
254
}
255

    
256
.overlay-wrapper {
257
	min-height:100%;
258
}
259

    
260
.lt-sidebar {
261
	width:250px;
262
	float:left;
263
	&.nav {
264
		margin-top:0;
265
		font-size:1em;
266
		overflow: auto;
267
	}
268
	&+.main {
269
		overflow:hidden;
270
	}
271
}
272

    
273
.main {
274
	padding:0 $main-padding-horizontal;
275
}
276

    
277
/* Header ----------------------------------------------- */
278

    
279
.header {
280
	position:fixed;
281
	top:0;
282
	left:0;
283
	right:0;
284
	width:100%;
285
	height:$header-height;
286
	line-height:$header-height;
287
	padding:0 $header-padding-horizontal;
288
	background:white;
289
	z-index:100;
290
	.icons-nav {
291
		position:absolute;
292
		left:$header-padding-horizontal;
293
		height:$header-height;
294
		line-height:$header-height;
295
		top:0;
296
		li {
297
			line-height: $header-height;
298
		}
299
	}
300
	.logo {
301
		text-align: center;
302
		a {
303
			position: relative;
304
			top:-5px;
305
		}
306
		img {
307
			max-height: 30px;			
308
		}
309
		h2 {
310
			display: none;
311
			margin:0;
312
			font-size: 1em;
313
			color:$primary-color;
314
			font-weight: normal;
315
		}
316
	}
317
	.login {
318
		position:absolute;
319
		top:25px;
320
		right:$header-padding-horizontal;
321

    
322
		.wrap {
323
			$wr-padd-top:12px;
324
			border:1px solid $body-font-color;
325
			background: white;
326
			font-size:emCalc(12px);
327
			padding:$wr-padd-top 30px;
328
			line-height:100%;
329
			ul {
330
				padding:0;
331
				margin:0;
332
				list-style: none outside none;
333
				display: none;
334
				li {
335
					list-style: none outside none;
336
					padding:0;
337
					padding-top:$wr-padd-top;
338
				}
339
			}
340
		}
341
	}
342
	
343
}
344

    
345
/* Actions Bar ----------------------------------------------- */
346

    
347
.actions-bar {
348
	position:fixed;
349
	left:0;
350
	top:$header-height;
351
	width:100%;
352
	z-index:15;
353
	text-align:center;
354
	height:$bar-height;
355
	line-height:$bar-height;
356
	background-color: lighten($primary-color,35%);
357
	h2 {
358
		float: left;
359
		margin:0 0 0 15px;
360
		font-size: emCalc(12px);
361
		line-height: $bar-height;
362
		font-weight: normal;
363

    
364
	}
365
	.filter-menu {
366
		float:right;
367
		position: relative;
368
		.filter {
369
			padding: 0 10px;
370
			font-size:emCalc(12px);
371
			position: relative;
372
			top:-2px;
373
		}
374
		.options {
375
			display: none;
376
			position: absolute;
377
			right: 0;
378
			top:$bar-height;
379
			width: 120px;
380
			list-style-type: none;
381
			padding: 10px 15px 15px;
382
			text-align: left;
383
			margin:0;
384
		}
385
		&.current {
386
			.options {
387
				background-color: lighten($primary-color,10%);
388
				display: inline-block;
389
				a {
390
					color: white;
391
				}
392
			}
393
		}
394

    
395

    
396
	}
397
	
398
	.row {
399
		position: relative;
400
		height: $bar-height;
401
	}
402

    
403
	.hd-search {
404
		$icon-dim :24px;
405
		width: $icon-dim;
406
		overflow:hidden;
407
		position:relative;
408
		float: right;
409
		height: $bar-height;
410
		margin-right: -6px;
411
		@include transition(width, 0.3s, linear);
412
		-webkit-backface-visibility: hidden;
413
		.hd-icon-search {
414
			display: block;
415
			width: $bar-height;
416
			height: $bar-height;
417
			line-height: $bar-height;
418
			float: right;
419
			color: $link-color;
420
			&:hover {
421
				color: $link-color-hover;
422
				cursor:pointer;
423
			}
424
			z-index:1;
425
			position: relative;
426
			background: lighten($primary-color,35%);
427
		}
428
		.hd-search-input {
429
			border: transparent;
430
			background-color: white;
431
			padding: 0 10px;
432
			width: 160px;
433
			font-size: emCalc(10px);
434
			box-shadow: none;
435
			height:0.7* $bar-height;
436
			line-height: 0.7* $bar-height;
437
			position: absolute;
438
			top:4px;
439
			left:0;
440
		}
441
		&.hd-open {
442
			width: 190px;
443
		}
444
	}
445
	.view-type {
446
		float: right;
447
		margin-right:15px;
448
		.current, a:hover {
449
			color: $secondary-color;
450
		}
451
		.snf-listview {
452
			position: relative;
453
			top: 3px;
454
			margin-right: 3px;
455
			font-size: 22px;
456
		}
457
		.snf-gridview {
458
				font-size: 22px;
459
				position: relative;
460
				top: 3px;
461
				margin-right: 3px;
462
		}
463
		
464
	}
465
}
466

    
467
/* Icons Navigation ----------------------------------------------- */
468

    
469
.icons-nav {
470
	@include marginPaddingZero();
471
	li {
472
		display: inline-block;
473
		margin-right:$icons-nav-margin-horizontal;
474
		font-size: emCalc(26px);
475
		line-height: 1em;
476
	}
477
}
478

    
479

    
480

    
481

    
482
/* Top info  ----------------------------------------------- */
483

    
484
.top-info {
485
	padding:50px 100px;
486
	position: relative;
487
	z-index:10;
488
	display:none;
489
	.close {
490
		position: absolute;
491
		right:$header-padding-horizontal;
492
		top:50px;
493
		@include sprite('../images/info-close.png', 31px, 30px);
494
	}
495
}
496

    
497

    
498
.info.error {
499
	background:$error-color;
500
	color:#fff;
501
}
502

    
503

    
504
.info.alert {
505
	background:$alert-color;
506
	color:#fff;
507
}
508

    
509
.info.warning {
510
	background:$primary-color;
511
	color:#fff;
512
}
513

    
514
.info.success {
515
	background:$success-color;
516
	color:#fff;
517
}
518

    
519
.border-bottom-style1 {
520
	padding-bottom:20px;
521
	margin-bottom:20px;
522
	border-bottom:1px dashed $primary-color;
523
}
524

    
525

    
526
/* Progress Bar ----------------------------------------------- */
527

    
528
.progress-bar {
529
	position: fixed;
530
	bottom:0;
531
	left:0;
532
	border-top:1px solid $secondary-color;
533
	width:100%;
534
	background:#fff;
535
	padding:20px 0 20px 310px;
536
	color:$primary-color;
537
	span.counter {
538
		display: inline-block;
539
		margin-right:20px;
540
		float:left;
541
	}
542
	div.progress-wrap {
543
		display:inline-block;
544
		float:left;
545
		width:40%;
546
		margin-right:60px;
547
		.progress {
548
			position: relative;
549
			top:2px;
550
		}
551
	}
552
	span.more {
553
		display: inline-block;
554
	}
555
}
556

    
557

    
558
/* Responive ------------------------------------------------ */
559
@media only screen and (max-width: $small-mobile) {
560
}
561

    
562
@media only screen and (max-width: $small-screen) {
563
	body {
564
		padding-top:0
565
	}
566
	.header, .actions-bar {
567
		position:static;
568
		z-index: auto;
569
	}
570
	.actions-bar {
571
		top:2*$header-height;
572
	}
573
	.header {
574
		height: $header-height-responsive;
575
		line-height:50px;
576
		.icons-nav {
577
			position: static;
578
		}
579
	}
580
}