Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (11.4 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
  - Scroll Bar
14

    
15
 */
16

    
17
/* Clearfix -------------------------------------------- */
18

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

    
32
/* Mixins ----------------------------------------------- */
33

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

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

    
51
}
52

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

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

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

    
76
// keyframes mixin
77
@mixin keyframes($name) {
78
  @-webkit-keyframes #{$name} {
79
    @content;
80
  }
81
  @-moz-keyframes #{$name} {
82
    @content;
83
  }
84
  @-ms-keyframes #{$name} {
85
    @content;
86
  }
87
  @keyframes #{$name} {
88
    @content;
89
  }
90
}
91

    
92

    
93
// style .lt-bar
94

    
95
@mixin ltbar($width:$lt-bar-width, $bgcolor: #fff ){
96
	position: fixed;
97
	width: $width;
98
	left:50%;
99
	top:$header-height + $bar-height;
100
	padding:8px 10px;
101
	margin-left:-($row-width - 2*$main-padding-horizontal)/2;
102
	@include box-shadow(3px -2px 8px #ccc);
103
	background: $bgcolor;
104
	z-index: 3;
105
}
106

    
107
@mixin square($side, $bgcolor) {
108
	width: $side;
109
	height: $side;
110
	background-color: $bgcolor;
111
	display: inline-block;
112
}
113

    
114
@mixin circle($radius, $bgcolor: $primary-color) {
115
	display:inline-block;
116
    -webkit-border-radius: 999px;
117
    -moz-border-radius: 999px;
118
    border-radius: 999px;
119
    width: $radius * 2;
120
    height: $radius * 2;
121
    background-color: $bgcolor;
122
    behavior: url(PIE.htc);
123
}
124

    
125
@mixin stateColor($color) {
126
	.img-wrap {
127
		.snf-pc-full,
128
		.snf-network-full, .snf-font {
129
			color:$color;
130
		}
131
	}
132
	.status {
133
		color: $color;
134
	}
135
}
136

    
137
/* Circle and Tags ----------------------------------------------- */
138

    
139

    
140
.tags {
141
	text-align:center;
142
	.tag {
143
		@include circle(6px);
144
		margin:0 3px;
145
		&.tag1 { background-color:$error-color;}
146
		&.tag2 { background-color:$success-color;}
147
		&.tag3 { background-color:$alert-color;}
148
	}
149
}
150

    
151

    
152
/* Buttons and Links ----------------------------------------------- */
153

    
154

    
155
a {
156
	color:$link-color;
157
	&:hover, &.current, &.active  {
158
		color:$link-color-hover;
159
		@include transition(background, 300ms, ease-out);
160
	}
161

    
162
	
163
}
164

    
165
.inactive {
166
	color:$inactive-color!important;
167
	&:hover {
168
		color:$inactive-color;
169
		cursor:default;
170
	}
171
}
172

    
173

    
174
.btn1 {
175
	border:1px solid $primary-color;
176
	color:$primary-color;
177
	display:inline-block;
178
	padding:10px 20px;
179
	line-height:1em;
180
	text-align:center;
181
	&:hover,
182
	&.current,
183
	&:focus {
184
		border-color:$secondary-color;
185
		background:$secondary-color;
186
		color:#fff;
187
	}
188
	&.current {
189
		cursor:default;
190
	}
191
}
192

    
193
.btn2 {
194
	@extend .btn1;
195
	color:$secondary-color;
196
	background:#fff;
197
	border-color:$secondary-color;
198
	&:hover, 
199
	&.current,
200
	&:focus {
201
		background:transparent;
202
		border-color:#fff;
203
	}
204
}
205

    
206
.btn3 {
207
	@extend .btn1;
208
	color:#fff; 
209
	border-color:#fff;
210
	&:hover, 
211
	&.current,
212
	&:focus {
213
		color:$secondary-color;
214
		background:#fff;
215
		border-color:#fff;
216
	}
217
}
218

    
219
.btn4 {
220
	@extend .btn1;
221
	color:#fff; 
222
	border-color:#fff;
223
	background: $secondary-color;
224
	&:hover, 
225
	&.current,
226
	&:focus {
227
		color: $secondary-color;
228
  		border-color:  $secondary-color;
229
  		background: #fff;
230
	}
231
}
232

    
233
.btn5 {
234
	border:1px solid white;
235
	color:white;
236
	display:inline-block;
237
	padding:0 20px;
238
	line-height:$btn-height - 2px;
239
	height:$btn-height;
240
	text-align:center;
241
	font-size:emCalc(12px);
242
	&:hover,
243
	&:focus {
244
		border-width:2px;
245
		line-height: $btn-height - 4px;
246
		padding:0 19px;
247
		color:white;
248
	}
249
	&.current {
250
		background:white;
251
		color:$secondary-color;
252
	}
253
}
254

    
255
.btn-img {
256
	@extend .btn1;
257
	border-color:$secondary-color;
258
	&:hover,
259
	&:focus {
260
		background:transparent;
261
	}
262
	a {
263
		img,span {
264
			margin-left:5px;
265
		}
266
	}
267
}
268

    
269

    
270
/* Layout ----------------------------------------------- */
271
html,body {
272
	height:100%;
273
}
274

    
275
body {
276
	padding-top:$header-height+$bar-height;
277
}
278

    
279
.body-wrapper {
280
	min-height:100%;
281
}
282

    
283
.main {
284
	padding:0 $main-padding-horizontal;
285
}
286

    
287
/* Header ----------------------------------------------- */
288

    
289
.header {
290
	position:fixed;
291
	top:0;
292
	left:0;
293
	right:0;
294
	width:100%;
295
	height:$header-height;
296
	line-height:$header-height;
297
	padding:0 $header-padding-horizontal;
298
	background:white;
299
	z-index:100;
300
	.icons-nav {
301
		position:absolute;
302
		left:$header-padding-horizontal;
303
		height:$header-height;
304
		line-height:$header-height;
305
		top:0;
306
		li {
307
			line-height: $header-height;
308
		}
309
	}
310
	.logo {
311
		text-align: center;
312
		a {
313
			position: relative;
314
			// top:-5px;
315
		}
316
		img {
317
			height: 40px;
318
		}
319
		h2 {
320
			display: none;
321
			margin:0;
322
			font-size: 1em;
323
			color:$primary-color;
324
			font-weight: normal;
325
		}
326
	}
327
	.login {
328
		position:absolute;
329
		top:25px;
330
		right:$header-padding-horizontal;
331

    
332
		.wrap {
333
			$wr-padd-top:12px;
334
			border:1px solid $body-font-color;
335
			background: white;
336
			font-size:emCalc(12px);
337
			padding:$wr-padd-top 30px;
338
			line-height:100%;
339
			ul {
340
				padding:0;
341
				margin:0;
342
				list-style: none outside none;
343
				display: none;
344
				li {
345
					list-style: none outside none;
346
					padding:0;
347
					padding-top:$wr-padd-top;
348
				}
349
			}
350
		}
351
	}
352
	
353
}
354

    
355
/* Actions Bar ----------------------------------------------- */
356

    
357
.actions-bar {
358
	position:fixed;
359
	left:0;
360
	top:$header-height;
361
	width:100%;
362
	z-index:15;
363
	text-align:center;
364
	height:$bar-height;
365
	line-height:$bar-height;
366
	background-color: $light-bg;
367
	h2 {
368
		float: left;
369
		margin:0 0 0 15px;
370
		font-size: emCalc(12px);
371
		line-height: $bar-height;
372
		font-weight: normal;
373
		a {
374
			&:after {
375
				content: " >";
376
			}
377
		}
378
	}
379
	.filter-menu {
380
		float:right;
381
		position: relative;
382
		.filter {
383
			padding: 0 10px;
384
			font-size:emCalc(12px);
385
			position: relative;
386
			top:-2px;
387
		}
388
		.options {
389
			display: none;
390
			position: absolute;
391
			right: 0;
392
			top:$bar-height;
393
			width: 120px;
394
			list-style-type: none;
395
			padding: 10px 15px 15px;
396
			text-align: left;
397
			margin:0;
398
		}
399
		&.current {
400
			.options {
401
				background-color: lighten($primary-color,10%);
402
				display: inline-block;
403
				a {
404
					color: white;
405
				}
406
			}
407
		}
408

    
409

    
410
	}
411
	
412
	.row {
413
		position: relative;
414
		height: $bar-height;
415
	}
416

    
417
	.hd-search {
418
		$icon-dim :24px;
419
		width: $icon-dim;
420
		overflow:hidden;
421
		position:relative;
422
		float: right;
423
		height: $bar-height;
424
		margin-right: -6px;
425
		@include transition(width, 0.3s, linear);
426
		-webkit-backface-visibility: hidden;
427
		.hd-icon-search {
428
			display: block;
429
			width: $bar-height;
430
			height: $bar-height;
431
			line-height: $bar-height;
432
			float: right;
433
			color: $link-color;
434
			&:hover {
435
				color: $link-color-hover;
436
				cursor:pointer;
437
			}
438
			z-index:1;
439
			position: relative;
440
			background: lighten($primary-color,35%);
441
		}
442
		.hd-search-input {
443
			border: transparent;
444
			background-color: white;
445
			padding: 0 10px;
446
			width: 160px;
447
			font-size: emCalc(10px);
448
			box-shadow: none;
449
			height:0.7* $bar-height;
450
			line-height: 0.7* $bar-height;
451
			position: absolute;
452
			top:4px;
453
			left:0;
454
		}
455
		&.hd-open {
456
			width: 190px;
457
		}
458
	}
459
	.rt-actions {
460
		float: right;
461
		margin-right:15px;
462
		.current, a:hover {
463
			color: $secondary-color;
464
		}
465
		a {
466
			margin-right: 10px;
467
			span {
468
				font-size: emCalc(20px);
469
				position: relative;
470
				&.snf-trash-outline {
471
					font-size: emCalc(16px);
472
					bottom: 3px;
473
				}
474
				&.snf-folder-outline {
475
					bottom: 0;
476
				}
477
				&.symbol {
478
					font-size: emCalc(14px);
479
					left: -14px;
480
					bottom: 1px;
481
				}
482
				&.snf-refresh-outline {
483
					font-size: emCalc(16px);
484
					left: -8px;
485
					bottom: 2px;
486
				}
487
			}
488
			&.refresh {
489
				margin-right:-8px;
490
			}
491
		}
492
		.single {
493
			@include square(14px , $link-color);
494
			&.current,
495
			&:hover {
496
				background-color: $secondary-color;
497
			}
498
		}
499
		
500
	}
501
}
502

    
503
.no-vm {
504
	.actions-bar {
505
		.rt-actions, .hd-search, .filter {
506
			display: none;
507
		}
508
	}
509
}
510

    
511
/* Icons Navigation ----------------------------------------------- */
512

    
513
.icons-nav {
514
	@include marginPaddingZero();
515
	li {
516
		display: inline-block;
517
		margin-right:$icons-nav-margin-horizontal;
518
		font-size: emCalc(26px);
519
		line-height: 1em;
520
	}
521
}
522

    
523

    
524

    
525

    
526
/* Top info  ----------------------------------------------- */
527

    
528
.top-info {
529
	padding:50px 100px;
530
	position: relative;
531
	z-index:10;
532
	display:none;
533
	.close {
534
		position: absolute;
535
		right:$header-padding-horizontal;
536
		top:50px;
537
		@include sprite('../images/info-close.png', 31px, 30px);
538
	}
539
}
540

    
541

    
542
.info.error {
543
	background:$error-color;
544
	color:#fff;
545
}
546

    
547

    
548
.info.alert {
549
	background:$alert-color;
550
	color:#fff;
551
}
552

    
553
.info.warning {
554
	background:$primary-color;
555
	color:#fff;
556
}
557

    
558
.info.success {
559
	background:$success-color;
560
	color:#fff;
561
}
562

    
563
.border-bottom-style1 {
564
	padding-bottom:20px;
565
	margin-bottom:20px;
566
	border-bottom:1px dashed $primary-color;
567
}
568

    
569

    
570
/* Progress Bar ----------------------------------------------- */
571

    
572
.progress-bar {
573
	position: fixed;
574
	bottom:0;
575
	left:0;
576
	border-top:1px solid $secondary-color;
577
	width:100%;
578
	background:#fff;
579
	padding:20px 0 20px 310px;
580
	color:$primary-color;
581
	span.counter {
582
		display: inline-block;
583
		margin-right:20px;
584
		float:left;
585
	}
586
	div.progress-wrap {
587
		display:inline-block;
588
		float:left;
589
		width:40%;
590
		margin-right:60px;
591
		.progress {
592
			position: relative;
593
			top:2px;
594
		}
595
	}
596
	span.more {
597
		display: inline-block;
598
	}
599
}
600

    
601
.storage-progress {
602
	display: none;
603
	position: fixed;
604
	bottom: 0;
605
	left: 0;
606
	right: 0;
607
	background: $cobalt-1;
608
	color: #fff;
609
	z-index: 50;
610
	overflow-y: auto;
611
	.wrap {
612
		position: relative;
613
		padding: 10px;
614
	}
615
	.loader {
616
		position: absolute;
617
		height: 5px;
618
		left: 0;
619
		top: 0;
620
		background: $yellow-1;
621
		width: 0%;
622
	}
623
	.summary {
624
		padding-left: $lt-bar-width + $check-w;
625
		margin: 0;
626
		font-size: emCalc(12px);
627
	}
628
	.details {
629
		display: none;
630
	}
631
}
632

    
633

    
634
/* Responive ------------------------------------------------ */
635
@media only screen and (max-width: $small-mobile) {
636
}
637

    
638
@media only screen and (max-width: $small-screen) {
639
	body {
640
		padding-top:0
641
	}
642
	.header, .actions-bar {
643
		position:static;
644
		z-index: auto;
645
	}
646
	.actions-bar {
647
		top:2*$header-height;
648
	}
649
	.header {
650
		height: $header-height-responsive;
651
		line-height:50px;
652
		.icons-nav {
653
			position: static;
654
		}
655
	}
656
}
657

    
658
/* Scroll Bar  -------------------------------------------- */
659

    
660
body .jspVerticalBar {
661
	background-color: transparent;
662
	width: 14px;
663
	padding: 1px;
664
	border-left: 1px solid #c2bebe;
665
	border-right: 1px solid #c2bebe;
666
	.jspTrack {
667
		background-color: #e6e5e5;
668
		.jspDrag {
669
			-webkit-border-radius: 5px;
670
			-moz-border-radius: 5px;
671
			border-radius: 5px;
672
			background-color: #c2bebe;
673
		}
674
	}
675
	.jspArrow {
676
		background-color: transparent;
677
		@include sprite('../images/arrows.png', 14px, 14px);
678
		overflow: hidden;
679
		&.jspArrowDown{
680
			background-position: -18px;
681
		}
682

    
683
		&.jspArrowUp {
684
			background-position: 0px;
685
		}
686
	}
687
}