Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (10.1 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

    
91

    
92
// style .lt-bar
93

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

    
106
@mixin square($side) {
107
	width: $side;
108
	height: $side;
109

    
110
}
111

    
112
/* Circle and Tags ----------------------------------------------- */
113
.circle {
114
	display:inline-block;
115
    -webkit-border-radius: 999px;
116
    -moz-border-radius: 999px;
117
    border-radius: 999px;
118
    behavior: url(PIE.htc);
119
}
120

    
121
.tags {
122
	text-align:center;
123
	.tag {
124
		@extend .circle;
125
		width:12px;
126
		height:12px;
127
		margin:0 3px;
128
		&.tag1 { background-color:$error-color;}
129
		&.tag2 { background-color:$success-color;}
130
		&.tag3 { background-color:$alert-color;}
131
	}
132
}
133

    
134
.tag-demo {
135
	@extend .circle;
136
	width: 18px;
137
	height: 18px;
138
	position: relative;
139
	bottom: -5px;
140
	margin-right: 20px;
141

    
142
	//temp
143
	&.tag4 { background-color: #ff5e4d;}
144
	&.tag5 { background-color: #25bfda;}
145
	&.tag6 { background-color: #fbf7c5;}
146
	&.tag7 { background-color: #83a697;}
147
}
148

    
149

    
150

    
151
/* Buttons and Links ----------------------------------------------- */
152

    
153

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

    
161
	
162
}
163

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

    
172

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

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

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

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

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

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

    
268

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

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

    
278
.overlay-wrapper {
279
	min-height:100%;
280
}
281

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

    
286
/* Header ----------------------------------------------- */
287

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

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

    
354
/* Actions Bar ----------------------------------------------- */
355

    
356
.actions-bar {
357
	position:fixed;
358
	left:0;
359
	top:$header-height;
360
	width:100%;
361
	z-index:15;
362
	text-align:center;
363
	height:$bar-height;
364
	line-height:$bar-height;
365
	background-color: $light-bg;
366
	h2 {
367
		float: left;
368
		margin:0 0 0 15px;
369
		font-size: emCalc(12px);
370
		line-height: $bar-height;
371
		font-weight: normal;
372

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

    
404

    
405
	}
406
	
407
	.row {
408
		position: relative;
409
		height: $bar-height;
410
	}
411

    
412
	.hd-search {
413
		$icon-dim :24px;
414
		width: $icon-dim;
415
		overflow:hidden;
416
		position:relative;
417
		float: right;
418
		height: $bar-height;
419
		margin-right: -6px;
420
		@include transition(width, 0.3s, linear);
421
		-webkit-backface-visibility: hidden;
422
		.hd-icon-search {
423
			display: block;
424
			width: $bar-height;
425
			height: $bar-height;
426
			line-height: $bar-height;
427
			float: right;
428
			color: $link-color;
429
			&:hover {
430
				color: $link-color-hover;
431
				cursor:pointer;
432
			}
433
			z-index:1;
434
			position: relative;
435
			background: lighten($primary-color,35%);
436
		}
437
		.hd-search-input {
438
			border: transparent;
439
			background-color: white;
440
			padding: 0 10px;
441
			width: 160px;
442
			font-size: emCalc(10px);
443
			box-shadow: none;
444
			height:0.7* $bar-height;
445
			line-height: 0.7* $bar-height;
446
			position: absolute;
447
			top:4px;
448
			left:0;
449
		}
450
		&.hd-open {
451
			width: 190px;
452
		}
453
	}
454
	.view-type {
455
		float: right;
456
		margin-right:15px;
457
		.current, a:hover {
458
			color: $secondary-color;
459
		}
460
		.list {
461
			margin-right: 3px;
462
			.snf-listview {
463
				position: relative;
464
				top: 3px;
465
				font-size: 22px;
466
			}
467
		}
468
		.grid {
469
			margin-right: 7px;
470
			.snf-gridview {
471
					font-size: 22px;
472
					position: relative;
473
					top: 3px;
474
			}
475
		}
476
		.single {
477
			@include square(14px);
478
			display: inline-block;
479
			border: 1px solid;
480
			background-color: transparent;
481
			&.current {
482
				background-color: $secondary-color;
483
			}
484
		}
485
		
486
	}
487
}
488

    
489
.no-vm {
490
	.actions-bar {
491
		.view-type, .hd-search, .filter {
492
			display: none;
493
		}
494
	}
495
}
496

    
497
/* Icons Navigation ----------------------------------------------- */
498

    
499
.icons-nav {
500
	@include marginPaddingZero();
501
	li {
502
		display: inline-block;
503
		margin-right:$icons-nav-margin-horizontal;
504
		font-size: emCalc(26px);
505
		line-height: 1em;
506
	}
507
}
508

    
509

    
510

    
511

    
512
/* Top info  ----------------------------------------------- */
513

    
514
.top-info {
515
	padding:50px 100px;
516
	position: relative;
517
	z-index:10;
518
	display:none;
519
	.close {
520
		position: absolute;
521
		right:$header-padding-horizontal;
522
		top:50px;
523
		@include sprite('../images/info-close.png', 31px, 30px);
524
	}
525
}
526

    
527

    
528
.info.error {
529
	background:$error-color;
530
	color:#fff;
531
}
532

    
533

    
534
.info.alert {
535
	background:$alert-color;
536
	color:#fff;
537
}
538

    
539
.info.warning {
540
	background:$primary-color;
541
	color:#fff;
542
}
543

    
544
.info.success {
545
	background:$success-color;
546
	color:#fff;
547
}
548

    
549
.border-bottom-style1 {
550
	padding-bottom:20px;
551
	margin-bottom:20px;
552
	border-bottom:1px dashed $primary-color;
553
}
554

    
555

    
556
/* Progress Bar ----------------------------------------------- */
557

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

    
587

    
588
/* Responive ------------------------------------------------ */
589
@media only screen and (max-width: $small-mobile) {
590
}
591

    
592
@media only screen and (max-width: $small-screen) {
593
	body {
594
		padding-top:0
595
	}
596
	.header, .actions-bar {
597
		position:static;
598
		z-index: auto;
599
	}
600
	.actions-bar {
601
		top:2*$header-height;
602
	}
603
	.header {
604
		height: $header-height-responsive;
605
		line-height:50px;
606
		.icons-nav {
607
			position: static;
608
		}
609
	}
610
}