Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13542 anikendra 1
/**
2
 * Items
3
 * --------------------------------------------------
4
 */
5
 
6
.item {
7
  @include item-style($item-default-bg, $item-default-border, $item-default-text);
8
 
9
  position: relative;
10
  z-index: $z-index-item; // Make sure the borders and stuff don't get hidden by children
11
  display: block;
12
 
13
  margin: $item-border-width * -1;
14
  padding: $item-padding;
15
 
16
  border-width: $item-border-width;
17
  border-style: solid;
18
  font-size: $item-font-size;
19
 
20
  h2 {
21
    margin: 0 0 2px 0;
22
    font-size: 16px;
23
    font-weight: normal;
24
  }
25
  h3 {
26
    margin: 0 0 4px 0;
27
    font-size: 14px;
28
  }
29
  h4 {
30
    margin: 0 0 4px 0;
31
    font-size: 12px;
32
  }
33
  h5, h6 {
34
    margin: 0 0 3px 0;
35
    font-size: 10px;
36
  }
37
  p {
38
    color: #666;
39
    font-size: 14px;
40
    margin-bottom: 2px;
41
  }
42
 
43
  h1:last-child,
44
  h2:last-child,
45
  h3:last-child,
46
  h4:last-child,
47
  h5:last-child,
48
  h6:last-child,
49
  p:last-child {
50
    margin-bottom: 0;
51
  }
52
 
53
  // Align badges within items
54
  .badge {
55
    @include display-flex();
56
    position: absolute;
57
    top: $item-padding;
58
    right: ($item-padding * 2);
59
  }
60
  &.item-button-right .badge {
61
    right: ($item-padding * 2) + 35;
62
  }
63
  &.item-divider .badge {
64
    top: ceil($item-padding / 2);
65
  }
66
  .badge + .badge {
67
    margin-right: 5px;
68
  }
69
 
70
  // Different themes for items
71
  &.item-light {
72
    @include item-style($item-light-bg, $item-light-border, $item-light-text);
73
  }
74
  &.item-stable {
75
    @include item-style($item-stable-bg, $item-stable-border, $item-stable-text);
76
  }
77
  &.item-positive {
78
    @include item-style($item-positive-bg, $item-positive-border, $item-positive-text);
79
  }
80
  &.item-calm {
81
    @include item-style($item-calm-bg, $item-calm-border, $item-calm-text);
82
  }
83
  &.item-assertive {
84
    @include item-style($item-assertive-bg, $item-assertive-border, $item-assertive-text);
85
  }
86
  &.item-balanced {
87
    @include item-style($item-balanced-bg, $item-balanced-border, $item-balanced-text);
88
  }
89
  &.item-energized {
90
    @include item-style($item-energized-bg, $item-energized-border, $item-energized-text);
91
  }
92
  &.item-royal {
93
    @include item-style($item-royal-bg, $item-royal-border, $item-royal-text);
94
  }
95
  &.item-dark {
96
    @include item-style($item-dark-bg, $item-dark-border, $item-dark-text);
97
  }
98
 
99
  &[ng-click]:hover {
100
    cursor: pointer;
101
  }
102
 
103
}
104
 
105
.list-borderless .item,
106
.item-borderless {
107
  border-width: 0;
108
}
109
 
110
// Link and Button Active States
111
.item.active,
112
.item.activated,
113
.item-complex.active .item-content,
114
.item-complex.activated .item-content,
115
.item .item-content.active,
116
.item .item-content.activated {
117
  @include item-active-style($item-default-active-bg, $item-default-active-border);
118
 
119
  // Different active themes for <a> and <button> items
120
  &.item-light {
121
    @include item-active-style($item-light-active-bg, $item-light-active-border);
122
  }
123
  &.item-stable {
124
    @include item-active-style($item-stable-active-bg, $item-stable-active-border);
125
  }
126
  &.item-positive {
127
    @include item-active-style($item-positive-active-bg, $item-positive-active-border);
128
  }
129
  &.item-calm {
130
    @include item-active-style($item-calm-active-bg, $item-calm-active-border);
131
  }
132
  &.item-assertive {
133
    @include item-active-style($item-assertive-active-bg, $item-assertive-active-border);
134
  }
135
  &.item-balanced {
136
    @include item-active-style($item-balanced-active-bg, $item-balanced-active-border);
137
  }
138
  &.item-energized {
139
    @include item-active-style($item-energized-active-bg, $item-energized-active-border);
140
  }
141
  &.item-royal {
142
    @include item-active-style($item-royal-active-bg, $item-royal-active-border);
143
  }
144
  &.item-dark {
145
    @include item-active-style($item-dark-active-bg, $item-dark-active-border);
146
  }
147
}
148
 
149
// Handle text overflow
150
.item,
151
.item h1,
152
.item h2,
153
.item h3,
154
.item h4,
155
.item h5,
156
.item h6,
157
.item p,
158
.item-content,
159
.item-content h1,
160
.item-content h2,
161
.item-content h3,
162
.item-content h4,
163
.item-content h5,
164
.item-content h6,
165
.item-content p {
166
  overflow: hidden;
167
  text-overflow: ellipsis;
168
  white-space: nowrap;
169
}
170
 
171
// Linked list items
172
a.item {
173
  color: inherit;
174
  text-decoration: none;
175
 
176
  &:hover,
177
  &:focus {
178
    text-decoration: none;
179
  }
180
}
181
 
182
 
183
/**
184
 * Complex Items
185
 * --------------------------------------------------
186
 * Adding .item-complex allows the .item to be slidable and
187
 * have options underneath the button, but also requires an
188
 * additional .item-content element inside .item.
189
 * Basically .item-complex removes any default settings which
190
 * .item added, so that .item-content looks them as just .item.
191
 */
192
 
193
.item-complex,
194
a.item.item-complex,
195
button.item.item-complex {
196
  padding: 0;
197
}
198
.item-complex .item-content,
199
.item-radio .item-content {
200
  position: relative;
201
  z-index: $z-index-item;
202
  padding: $item-padding (ceil( ($item-padding * 3) + ($item-padding / 3) ) - 5) $item-padding $item-padding;
203
  border: none;
204
  background-color: white;
205
}
206
 
207
a.item-content {
208
  display: block;
209
  color: inherit;
210
  text-decoration: none;
211
}
212
 
213
.item-text-wrap .item,
214
.item-text-wrap .item-content,
215
.item-text-wrap,
216
.item-text-wrap h1,
217
.item-text-wrap h2,
218
.item-text-wrap h3,
219
.item-text-wrap h4,
220
.item-text-wrap h5,
221
.item-text-wrap h6,
222
.item-text-wrap p,
223
.item-complex.item-text-wrap .item-content,
224
.item-body h1,
225
.item-body h2,
226
.item-body h3,
227
.item-body h4,
228
.item-body h5,
229
.item-body h6,
230
.item-body p {
231
  overflow: visible;
232
  white-space: normal;
233
}
234
.item-complex.item-text-wrap,
235
.item-complex.item-text-wrap h1,
236
.item-complex.item-text-wrap h2,
237
.item-complex.item-text-wrap h3,
238
.item-complex.item-text-wrap h4,
239
.item-complex.item-text-wrap h5,
240
.item-complex.item-text-wrap h6,
241
.item-complex.item-text-wrap p {
242
  overflow: visible;
243
  white-space: normal;
244
}
245
 
246
// Link and Button Active States
247
 
248
.item-complex{
249
  // Stylized items
250
  &.item-light > .item-content{
251
    @include item-style($item-light-bg, $item-light-border, $item-light-text);
252
    &.active, &:active {
253
      @include item-active-style($item-light-active-bg, $item-light-active-border);
254
    }
255
  }
256
  &.item-stable > .item-content{
257
    @include item-style($item-stable-bg, $item-stable-border, $item-stable-text);
258
    &.active, &:active {
259
      @include item-active-style($item-stable-active-bg, $item-stable-active-border);
260
    }
261
  }
262
  &.item-positive > .item-content{
263
    @include item-style($item-positive-bg, $item-positive-border, $item-positive-text);
264
    &.active, &:active {
265
      @include item-active-style($item-positive-active-bg, $item-positive-active-border);
266
    }
267
  }
268
  &.item-calm > .item-content{
269
    @include item-style($item-calm-bg, $item-calm-border, $item-calm-text);
270
    &.active, &:active {
271
      @include item-active-style($item-calm-active-bg, $item-calm-active-border);
272
    }
273
  }
274
  &.item-assertive > .item-content{
275
    @include item-style($item-assertive-bg, $item-assertive-border, $item-assertive-text);
276
    &.active, &:active {
277
      @include item-active-style($item-assertive-active-bg, $item-assertive-active-border);
278
    }
279
  }
280
  &.item-balanced > .item-content{
281
    @include item-style($item-balanced-bg, $item-balanced-border, $item-balanced-text);
282
    &.active, &:active {
283
      @include item-active-style($item-balanced-active-bg, $item-balanced-active-border);
284
    }
285
  }
286
  &.item-energized > .item-content{
287
    @include item-style($item-energized-bg, $item-energized-border, $item-energized-text);
288
    &.active, &:active {
289
      @include item-active-style($item-energized-active-bg, $item-energized-active-border);
290
    }
291
  }
292
  &.item-royal > .item-content{
293
    @include item-style($item-royal-bg, $item-royal-border, $item-royal-text);
294
    &.active, &:active {
295
      @include item-active-style($item-royal-active-bg, $item-royal-active-border);
296
    }
297
  }
298
  &.item-dark > .item-content{
299
    @include item-style($item-dark-bg, $item-dark-border, $item-dark-text);
300
    &.active, &:active {
301
      @include item-active-style($item-dark-active-bg, $item-dark-active-border);
302
    }
303
  }
304
}
305
 
306
 
307
/**
308
 * Item Icons
309
 * --------------------------------------------------
310
 */
311
 
312
.item-icon-left .icon,
313
.item-icon-right .icon {
314
  @include display-flex();
315
  @include align-items(center);
316
  position: absolute;
317
  top: 0;
318
  height: 100%;
319
  font-size: $item-icon-font-size;
320
 
321
  &:before {
322
    display: block;
323
    width: $item-icon-font-size;
324
    text-align: center;
325
  }
326
}
327
 
328
.item .fill-icon {
329
  min-width: $item-icon-fill-font-size + 2;
330
  min-height: $item-icon-fill-font-size + 2;
331
  font-size: $item-icon-fill-font-size;
332
}
333
 
334
.item-icon-left {
335
  padding-left: ceil( ($item-padding * 3) + ($item-padding / 3) );
336
 
337
  .icon {
338
    left: ceil( ($item-padding / 3) * 2);
339
  }
340
}
341
.item-complex.item-icon-left {
342
  padding-left: 0;
343
 
344
  .item-content {
345
    padding-left: ceil( ($item-padding * 3) + ($item-padding / 3) );
346
  }
347
}
348
 
349
.item-icon-right {
350
  padding-right: ceil( ($item-padding * 3) + ($item-padding / 3) );
351
 
352
  .icon {
353
    right: ceil( ($item-padding / 3) * 2);
354
  }
355
}
356
.item-complex.item-icon-right {
357
  padding-right: 0;
358
 
359
  .item-content {
360
    padding-right: ceil( ($item-padding * 3) + ($item-padding / 3) );
361
  }
362
}
363
 
364
.item-icon-left.item-icon-right .icon:first-child {
365
  right: auto;
366
}
367
.item-icon-left.item-icon-right .icon:last-child,
368
.item-icon-left .item-delete .icon {
369
  left: auto;
370
}
371
 
372
.item-icon-left .icon-accessory,
373
.item-icon-right .icon-accessory {
374
  color: $item-icon-accessory-color;
375
  font-size: $item-icon-accessory-font-size;
376
}
377
.item-icon-left .icon-accessory {
378
  left: floor($item-padding / 5);
379
}
380
.item-icon-right .icon-accessory {
381
  right: floor($item-padding / 5);
382
}
383
 
384
 
385
/**
386
 * Item Button
387
 * --------------------------------------------------
388
 * An item button is a child button inside an .item (not the entire .item)
389
 */
390
 
391
.item-button-left {
392
  padding-left: ceil($item-padding * 4.5);
393
}
394
 
395
.item-button-left > .button,
396
.item-button-left .item-content > .button {
397
  @include display-flex();
398
  @include align-items(center);
399
  position: absolute;
400
  top: ceil($item-padding / 2);
401
  left: ceil( ($item-padding / 3) * 2);
402
  min-width: $item-icon-font-size + ($button-border-width * 2);
403
  min-height: $item-icon-font-size + ($button-border-width * 2);
404
  font-size: $item-button-font-size;
405
  line-height: $item-button-line-height;
406
 
407
  .icon:before {
408
    position: relative;
409
    left: auto;
410
    width: auto;
411
    line-height: $item-icon-font-size - 1;
412
  }
413
 
414
  > .button {
415
    margin: 0px 2px;
416
    min-height: $item-icon-font-size + ($button-border-width * 2);
417
    font-size: $item-button-font-size;
418
    line-height: $item-button-line-height;
419
  }
420
}
421
 
422
.item-button-right,
423
a.item.item-button-right,
424
button.item.item-button-right {
425
  padding-right: $item-padding * 5;
426
}
427
 
428
.item-button-right > .button,
429
.item-button-right .item-content > .button,
430
.item-button-right > .buttons,
431
.item-button-right .item-content > .buttons {
432
  @include display-flex();
433
  @include align-items(center);
434
  position: absolute;
435
  top: ceil($item-padding / 2);
436
  right: $item-padding;
437
  min-width: $item-icon-font-size + ($button-border-width * 2);
438
  min-height: $item-icon-font-size + ($button-border-width * 2);
439
  font-size: $item-button-font-size;
440
  line-height: $item-button-line-height;
441
 
442
  .icon:before {
443
    position: relative;
444
    left: auto;
445
    width: auto;
446
    line-height: $item-icon-font-size - 1;
447
  }
448
 
449
  > .button {
450
    margin: 0px 2px;
451
    min-width: $item-icon-font-size + ($button-border-width * 2);
452
    min-height: $item-icon-font-size + ($button-border-width * 2);
453
    font-size: $item-button-font-size;
454
    line-height: $item-button-line-height;
455
  }
456
}
457
 
458
 
459
// Item Avatar
460
// -------------------------------
461
 
462
.item-avatar,
463
.item-avatar .item-content,
464
.item-avatar-left,
465
.item-avatar-left .item-content {
466
  padding-left: $item-avatar-width + ($item-padding * 2);
467
  min-height: $item-avatar-width + ($item-padding * 2);
468
 
469
  > img:first-child,
470
  .item-image {
471
    position: absolute;
472
    top: $item-padding;
473
    left: $item-padding;
474
    max-width: $item-avatar-width;
475
    max-height: $item-avatar-height;
476
    width: 100%;
477
    border-radius: $item-avatar-border-radius;
478
  }
479
}
480
 
481
.item-avatar-right,
482
.item-avatar-right .item-content {
483
  padding-right: $item-avatar-width + ($item-padding * 2);
484
  min-height: $item-avatar-width + ($item-padding * 2);
485
 
486
  > img:first-child,
487
  .item-image {
488
    position: absolute;
489
    top: $item-padding;
490
    right: $item-padding;
491
    max-width: $item-avatar-width;
492
    max-height: $item-avatar-height;
493
    width: 100%;
494
    border-radius: $item-avatar-border-radius;
495
  }
496
}
497
 
498
 
499
// Item Thumbnails
500
// -------------------------------
501
 
502
.item-thumbnail-left,
503
.item-thumbnail-left .item-content {
504
  padding-top: $item-padding / 2;
505
  padding-left: $item-thumbnail-width + $item-thumbnail-margin + $item-padding;
506
  min-height: $item-thumbnail-height + ($item-thumbnail-margin * 2);
507
 
508
  > img:first-child,
509
  .item-image {
510
    position: absolute;
511
    top: $item-thumbnail-margin;
512
    left: $item-thumbnail-margin;
513
    max-width: $item-thumbnail-width;
514
    max-height: $item-thumbnail-height;
515
    width: 100%;
516
  }
517
}
518
.item-avatar.item-complex,
519
.item-avatar-left.item-complex,
520
.item-thumbnail-left.item-complex {
521
  padding-top: 0;
522
  padding-left: 0;
523
}
524
 
525
.item-thumbnail-right,
526
.item-thumbnail-right .item-content {
527
  padding-top: $item-padding / 2;
528
  padding-right: $item-thumbnail-width + $item-thumbnail-margin + $item-padding;
529
  min-height: $item-thumbnail-height + ($item-thumbnail-margin * 2);
530
 
531
  > img:first-child,
532
  .item-image {
533
    position: absolute;
534
    top: $item-thumbnail-margin;
535
    right: $item-thumbnail-margin;
536
    max-width: $item-thumbnail-width;
537
    max-height: $item-thumbnail-height;
538
    width: 100%;
539
  }
540
}
541
.item-avatar-right.item-complex,
542
.item-thumbnail-right.item-complex {
543
  padding-top: 0;
544
  padding-right: 0;
545
}
546
 
547
 
548
// Item Image
549
// -------------------------------
550
 
551
.item-image {
552
  padding: 0;
553
  text-align: center;
554
 
555
  img:first-child, .list-img {
556
    width: 100%;
557
    vertical-align: middle;
558
  }
559
}
560
 
561
 
562
// Item Body
563
// -------------------------------
564
 
565
.item-body {
566
  overflow: auto;
567
  padding: $item-padding;
568
  text-overflow: inherit;
569
  white-space: normal;
570
 
571
  h1, h2, h3, h4, h5, h6, p {
572
    margin-top: $item-padding;
573
    margin-bottom: $item-padding;
574
  }
575
}
576
 
577
 
578
// Item Divider
579
// -------------------------------
580
 
581
.item-divider {
582
  padding-top: ceil($item-padding / 2);
583
  padding-bottom: ceil($item-padding / 2);
584
  min-height: 30px;
585
  background-color: $item-divider-bg;
586
  color: $item-divider-color;
587
  font-weight: 500;
588
}
589
 
590
.platform-ios .item-divider-platform,
591
.item-divider-ios {
592
  padding-top: 26px;
593
  text-transform: uppercase;
594
  font-weight: 300;
595
  font-size: 13px;
596
  background-color: #efeff4;
597
  color: #555;
598
}
599
 
600
.platform-android .item-divider-platform,
601
.item-divider-android {
602
  font-weight: 300;
603
  font-size: 13px;
604
}
605
 
606
 
607
// Item Note
608
// -------------------------------
609
 
610
.item-note {
611
  float: right;
612
  color: #aaa;
613
  font-size: 14px;
614
}
615
 
616
 
617
// Item Editing
618
// -------------------------------
619
 
620
.item-left-editable .item-content,
621
.item-right-editable .item-content {
622
  // setup standard transition settings
623
  @include transition-duration( $item-edit-transition-duration );
624
  @include transition-timing-function( $item-edit-transition-function );
625
  -webkit-transition-property: -webkit-transform;
626
     -moz-transition-property: -moz-transform;
627
          transition-property: transform;
628
}
629
 
630
.list-left-editing .item-left-editable .item-content,
631
.item-left-editing.item-left-editable .item-content {
632
  // actively editing the left side of the item
633
  @include translate3d($item-left-edit-open-width, 0, 0);
634
}
635
 
636
.list-right-editing .item-right-editable .item-content,
637
.item-right-editing.item-right-editable .item-content {
638
  // actively editing the left side of the item
639
  @include translate3d(-$item-right-edit-open-width, 0, 0);
640
}
641
 
642
.item-remove-animate {
643
  &.ng-leave {
644
    @include transition-duration( $item-remove-transition-duration );
645
  }
646
  &.ng-leave .item-content,
647
  &.ng-leave:last-of-type {
648
    @include transition-duration( $item-remove-transition-duration );
649
    @include transition-timing-function( $item-remove-transition-function );
650
    @include transition-property( all );
651
  }
652
 
653
  &.ng-leave.ng-leave-active .item-content {
654
    opacity:0;
655
    -webkit-transform: translate3d(-100%, 0, 0) !important;
656
    transform: translate3d(-100%, 0, 0) !important;
657
  }
658
  &.ng-leave.ng-leave-active:last-of-type {
659
    opacity: 0;
660
  }
661
 
662
  &.ng-leave.ng-leave-active ~ ion-item:not(.ng-leave) {
663
    -webkit-transform: translate3d(0, unquote('-webkit-calc(-100% + 1px)'), 0);
664
    transform: translate3d(0, calc(-100% + 1px), 0);
665
    @include transition-duration( $item-remove-transition-duration );
666
    @include transition-timing-function( $item-remove-descendents-transition-function );
667
    @include transition-property( all );
668
  }
669
}
670
 
671
 
672
 
673
// Item Left Edit Button
674
// -------------------------------
675
 
676
.item-left-edit {
677
  @include transition(all $item-edit-transition-function $item-edit-transition-duration / 2);
678
  position: absolute;
679
  top: 0;
680
  left: 0;
681
  z-index: $z-index-item-edit;
682
  width: $item-left-edit-open-width;
683
  height: 100%;
684
  line-height: 100%;
685
 
686
  .button {
687
    height: 100%;
688
 
689
    &.icon {
690
      @include display-flex();
691
      @include align-items(center);
692
      position: absolute;
693
      top: 0;
694
      height: 100%;
695
    }
696
  }
697
 
698
  display: none;
699
  opacity: 0;
700
  @include translate3d( ($item-left-edit-left - $item-left-edit-open-width) / 2, 0, 0);
701
  &.visible {
702
    display: block;
703
    &.active {
704
      opacity: 1;
705
      @include translate3d($item-left-edit-left, 0, 0);
706
    }
707
  }
708
}
709
.list-left-editing .item-left-edit {
710
  @include transition-delay($item-edit-transition-duration / 2);
711
}
712
 
713
// Item Delete (Left side edit button)
714
// -------------------------------
715
 
716
.item-delete .button.icon {
717
  color: $item-delete-icon-color;
718
  font-size: $item-delete-icon-size;
719
 
720
  &:hover {
721
    opacity: .7;
722
  }
723
}
724
 
725
 
726
// Item Right Edit Button
727
// -------------------------------
728
 
729
.item-right-edit {
730
  @include transition(all $item-edit-transition-function $item-edit-transition-duration / 2);
731
  position: absolute;
732
  top: 0;
733
  right: 0;
734
  z-index: 0;
735
  width: $item-right-edit-open-width *  1.5;
736
  height: 100%;
737
  background: inherit;
738
  padding-left: 20px;
739
 
740
  .button {
741
    min-width: $item-right-edit-open-width;
742
    height: 100%;
743
 
744
    &.icon {
745
      @include display-flex();
746
      @include align-items(center);
747
      position: absolute;
748
      top: 0;
749
      height: 100%;
750
      font-size: $item-reorder-icon-size;
751
    }
752
  }
753
 
754
  display: none;
755
  opacity: 0;
756
  @include translate3d($item-right-edit-open-width / 2, 0, 0);
757
  &.visible {
758
    display: block;
759
    z-index: $z-index-item-reorder;
760
    &.active {
761
      opacity: 1;
762
      @include translate3d(0, 0, 0);
763
    }
764
  }
765
}
766
.list-right-editing .item-right-edit {
767
  @include transition-delay($item-edit-transition-duration / 2);
768
}
769
 
770
 
771
// Item Reordering (Right side edit button)
772
// -------------------------------
773
 
774
.item-reorder .button.icon {
775
  color: $item-reorder-icon-color;
776
  font-size: $item-reorder-icon-size;
777
}
778
 
779
.item-reordering {
780
  // item is actively being reordered
781
  position: absolute;
782
  left: 0;
783
  top: 0;
784
  z-index: $z-index-item-reordering;
785
  width: 100%;
786
  box-shadow: 0px 0px 10px 0px #aaa;
787
 
788
  .item-reorder {
789
    z-index: 1;
790
  }
791
}
792
 
793
.item-placeholder {
794
  // placeholder for the item that's being reordered
795
  opacity: 0.7;
796
}
797
 
798
 
799
/**
800
 * The hidden right-side buttons that can be exposed under a list item
801
 * with dragging.
802
 */
803
.item-options {
804
  position: absolute;
805
  top: 0;
806
  right: 0;
807
  z-index: $z-index-item-options;
808
  height: 100%;
809
 
810
  .button {
811
    height: 100%;
812
    border: none;
813
    border-radius: 0;
814
    @include display-inline-flex();
815
    @include align-items(center);
816
 
817
    &:before{
818
      margin: 0 auto;
819
    }
820
  }
821
}