Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (10 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
				font-size: 22px;
464
			}
465
		}
466
		.grid {
467
			margin-right: 7px;
468
			.snf-gridview {
469
					font-size: 22px;
470
			}
471
		}
472
		.single {
473
			@include square(14px);
474
			display: inline-block;
475
			position: relative;
476
			bottom: 1px;
477
			border: 1px solid;
478
			background-color: transparent;
479
			&.current {
480
				background-color: $secondary-color;
481
			}
482
		}
483
		
484
	}
485
}
486

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

    
495
/* Icons Navigation ----------------------------------------------- */
496

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

    
507

    
508

    
509

    
510
/* Top info  ----------------------------------------------- */
511

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

    
525

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

    
531

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

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

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

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

    
553

    
554
/* Progress Bar ----------------------------------------------- */
555

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

    
585

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

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