Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (10.5 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
			span {
467
				font-size: emCalc(20px);
468
			}
469
		}
470
		.single {
471
			@include square(14px , $link-color);
472
			&.current,
473
			&:hover {
474
				background-color: $secondary-color;
475
			}
476
		}
477
		
478
	}
479
}
480

    
481
.no-vm {
482
	.actions-bar {
483
		.rt-actions, .hd-search, .filter {
484
			display: none;
485
		}
486
	}
487
}
488

    
489
/* Icons Navigation ----------------------------------------------- */
490

    
491
.icons-nav {
492
	@include marginPaddingZero();
493
	li {
494
		display: inline-block;
495
		margin-right:$icons-nav-margin-horizontal;
496
		font-size: emCalc(26px);
497
		line-height: 1em;
498
	}
499
}
500

    
501

    
502

    
503

    
504
/* Top info  ----------------------------------------------- */
505

    
506
.top-info {
507
	padding:50px 100px;
508
	position: relative;
509
	z-index:10;
510
	display:none;
511
	.close {
512
		position: absolute;
513
		right:$header-padding-horizontal;
514
		top:50px;
515
		@include sprite('../images/info-close.png', 31px, 30px);
516
	}
517
}
518

    
519

    
520
.info.error {
521
	background:$error-color;
522
	color:#fff;
523
}
524

    
525

    
526
.info.alert {
527
	background:$alert-color;
528
	color:#fff;
529
}
530

    
531
.info.warning {
532
	background:$primary-color;
533
	color:#fff;
534
}
535

    
536
.info.success {
537
	background:$success-color;
538
	color:#fff;
539
}
540

    
541
.border-bottom-style1 {
542
	padding-bottom:20px;
543
	margin-bottom:20px;
544
	border-bottom:1px dashed $primary-color;
545
}
546

    
547

    
548
/* Progress Bar ----------------------------------------------- */
549

    
550
.progress-bar {
551
	position: fixed;
552
	bottom:0;
553
	left:0;
554
	border-top:1px solid $secondary-color;
555
	width:100%;
556
	background:#fff;
557
	padding:20px 0 20px 310px;
558
	color:$primary-color;
559
	span.counter {
560
		display: inline-block;
561
		margin-right:20px;
562
		float:left;
563
	}
564
	div.progress-wrap {
565
		display:inline-block;
566
		float:left;
567
		width:40%;
568
		margin-right:60px;
569
		.progress {
570
			position: relative;
571
			top:2px;
572
		}
573
	}
574
	span.more {
575
		display: inline-block;
576
	}
577
}
578

    
579

    
580
/* Responive ------------------------------------------------ */
581
@media only screen and (max-width: $small-mobile) {
582
}
583

    
584
@media only screen and (max-width: $small-screen) {
585
	body {
586
		padding-top:0
587
	}
588
	.header, .actions-bar {
589
		position:static;
590
		z-index: auto;
591
	}
592
	.actions-bar {
593
		top:2*$header-height;
594
	}
595
	.header {
596
		height: $header-height-responsive;
597
		line-height:50px;
598
		.icons-nav {
599
			position: static;
600
		}
601
	}
602
}
603

    
604
/* Scroll Bar  -------------------------------------------- */
605

    
606
body .jspVerticalBar {
607
	background-color: transparent;
608
	width: 14px;
609
	padding: 1px;
610
	border-left: 1px solid #c2bebe;
611
	border-right: 1px solid #c2bebe;
612
	.jspTrack {
613
		background-color: #e6e5e5;
614
		.jspDrag {
615
			-webkit-border-radius: 5px;
616
			-moz-border-radius: 5px;
617
			border-radius: 5px;
618
			background-color: #c2bebe;
619
		}
620
	}
621
	.jspArrow {
622
		background-color: transparent;
623
		@include sprite('../images/arrows.png', 14px, 14px);
624
		overflow: hidden;
625
		&.jspArrowDown{
626
			background-position: -18px;
627
		}
628

    
629
		&.jspArrowUp {
630
			background-position: 0px;
631
		}
632
	}
633
}