Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15747 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
    height: 100%;
478
    border-radius: $item-avatar-border-radius;
479
  }
480
}
481
 
482
.item-avatar-right,
483
.item-avatar-right .item-content {
484
  padding-right: $item-avatar-width + ($item-padding * 2);
485
  min-height: $item-avatar-width + ($item-padding * 2);
486
 
487
  > img:first-child,
488
  .item-image {
489
    position: absolute;
490
    top: $item-padding;
491
    right: $item-padding;
492
    max-width: $item-avatar-width;
493
    max-height: $item-avatar-height;
494
    width: 100%;
495
    height: 100%;
496
    border-radius: $item-avatar-border-radius;
497
  }
498
}
499
 
500
 
501
// Item Thumbnails
502
// -------------------------------
503
 
504
.item-thumbnail-left,
505
.item-thumbnail-left .item-content {
506
  padding-top: $item-padding / 2;
507
  padding-left: $item-thumbnail-width + $item-thumbnail-margin + $item-padding;
508
  min-height: $item-thumbnail-height + ($item-thumbnail-margin * 2);
509
 
510
  > img:first-child,
511
  .item-image {
512
    position: absolute;
513
    top: $item-thumbnail-margin;
514
    left: $item-thumbnail-margin;
515
    max-width: $item-thumbnail-width;
516
    max-height: $item-thumbnail-height;
517
    width: 100%;
518
    height: 100%;
519
  }
520
}
521
.item-avatar.item-complex,
522
.item-avatar-left.item-complex,
523
.item-thumbnail-left.item-complex {
524
  padding-top: 0;
525
  padding-left: 0;
526
}
527
 
528
.item-thumbnail-right,
529
.item-thumbnail-right .item-content {
530
  padding-top: $item-padding / 2;
531
  padding-right: $item-thumbnail-width + $item-thumbnail-margin + $item-padding;
532
  min-height: $item-thumbnail-height + ($item-thumbnail-margin * 2);
533
 
534
  > img:first-child,
535
  .item-image {
536
    position: absolute;
537
    top: $item-thumbnail-margin;
538
    right: $item-thumbnail-margin;
539
    max-width: $item-thumbnail-width;
540
    max-height: $item-thumbnail-height;
541
    width: 100%;
542
    height: 100%;
543
  }
544
}
545
.item-avatar-right.item-complex,
546
.item-thumbnail-right.item-complex {
547
  padding-top: 0;
548
  padding-right: 0;
549
}
550
 
551
 
552
// Item Image
553
// -------------------------------
554
 
555
.item-image {
556
  padding: 0;
557
  text-align: center;
558
 
559
  img:first-child, .list-img {
560
    width: 100%;
561
    vertical-align: middle;
562
  }
563
}
564
 
565
 
566
// Item Body
567
// -------------------------------
568
 
569
.item-body {
570
  overflow: auto;
571
  padding: $item-padding;
572
  text-overflow: inherit;
573
  white-space: normal;
574
 
575
  h1, h2, h3, h4, h5, h6, p {
576
    margin-top: $item-padding;
577
    margin-bottom: $item-padding;
578
  }
579
}
580
 
581
 
582
// Item Divider
583
// -------------------------------
584
 
585
.item-divider {
586
  padding-top: ceil($item-padding / 2);
587
  padding-bottom: ceil($item-padding / 2);
588
  min-height: 30px;
589
  background-color: $item-divider-bg;
590
  color: $item-divider-color;
591
  font-weight: 500;
592
}
593
 
594
.platform-ios .item-divider-platform,
595
.item-divider-ios {
596
  padding-top: 26px;
597
  text-transform: uppercase;
598
  font-weight: 300;
599
  font-size: 13px;
600
  background-color: #efeff4;
601
  color: #555;
602
}
603
 
604
.platform-android .item-divider-platform,
605
.item-divider-android {
606
  font-weight: 300;
607
  font-size: 13px;
608
}
609
 
610
 
611
// Item Note
612
// -------------------------------
613
 
614
.item-note {
615
  float: right;
616
  color: #aaa;
617
  font-size: 14px;
618
}
619
 
620
 
621
// Item Editing
622
// -------------------------------
623
 
624
.item-left-editable .item-content,
625
.item-right-editable .item-content {
626
  // setup standard transition settings
627
  @include transition-duration( $item-edit-transition-duration );
628
  @include transition-timing-function( $item-edit-transition-function );
629
  -webkit-transition-property: -webkit-transform;
630
     -moz-transition-property: -moz-transform;
631
          transition-property: transform;
632
}
633
 
634
.list-left-editing .item-left-editable .item-content,
635
.item-left-editing.item-left-editable .item-content {
636
  // actively editing the left side of the item
637
  @include translate3d($item-left-edit-open-width, 0, 0);
638
}
639
 
640
.item-remove-animate {
641
  &.ng-leave {
642
    @include transition-duration( $item-remove-transition-duration );
643
  }
644
  &.ng-leave .item-content,
645
  &.ng-leave:last-of-type {
646
    @include transition-duration( $item-remove-transition-duration );
647
    @include transition-timing-function( $item-remove-transition-function );
648
    @include transition-property( all );
649
  }
650
 
651
  &.ng-leave.ng-leave-active .item-content {
652
    opacity:0;
653
    -webkit-transform: translate3d(-100%, 0, 0) !important;
654
    transform: translate3d(-100%, 0, 0) !important;
655
  }
656
  &.ng-leave.ng-leave-active:last-of-type {
657
    opacity: 0;
658
  }
659
 
660
  &.ng-leave.ng-leave-active ~ ion-item:not(.ng-leave) {
661
    -webkit-transform: translate3d(0, unquote('-webkit-calc(-100% + 1px)'), 0);
662
    transform: translate3d(0, calc(-100% + 1px), 0);
663
    @include transition-duration( $item-remove-transition-duration );
664
    @include transition-timing-function( $item-remove-descendents-transition-function );
665
    @include transition-property( all );
666
  }
667
}
668
 
669
 
670
 
671
// Item Left Edit Button
672
// -------------------------------
673
 
674
.item-left-edit {
675
  @include transition(all $item-edit-transition-function $item-edit-transition-duration / 2);
676
  position: absolute;
677
  top: 0;
678
  left: 0;
679
  z-index: $z-index-item-edit;
680
  width: $item-left-edit-open-width;
681
  height: 100%;
682
  line-height: 100%;
683
 
684
  .button {
685
    height: 100%;
686
 
687
    &.icon {
688
      @include display-flex();
689
      @include align-items(center);
690
      position: absolute;
691
      top: 0;
692
      height: 100%;
693
    }
694
  }
695
 
696
  display: none;
697
  opacity: 0;
698
  @include translate3d( ($item-left-edit-left - $item-left-edit-open-width) / 2, 0, 0);
699
  &.visible {
700
    display: block;
701
    &.active {
702
      opacity: 1;
703
      @include translate3d($item-left-edit-left, 0, 0);
704
    }
705
  }
706
}
707
.list-left-editing .item-left-edit {
708
  @include transition-delay($item-edit-transition-duration / 2);
709
}
710
 
711
// Item Delete (Left side edit button)
712
// -------------------------------
713
 
714
.item-delete .button.icon {
715
  color: $item-delete-icon-color;
716
  font-size: $item-delete-icon-size;
717
 
718
  &:hover {
719
    opacity: .7;
720
  }
721
}
722
 
723
 
724
// Item Right Edit Button
725
// -------------------------------
726
 
727
.item-right-edit {
728
  @include transition(all $item-edit-transition-function $item-edit-transition-duration);
729
  position: absolute;
730
  top: 0;
731
  right: 0;
732
  z-index: $z-index-item-reorder;
733
  width: $item-right-edit-open-width *  1.5;
734
  height: 100%;
735
  background: inherit;
736
  padding-left: 20px;
737
 
738
  .button {
739
    min-width: $item-right-edit-open-width;
740
    height: 100%;
741
 
742
    &.icon {
743
      @include display-flex();
744
      @include align-items(center);
745
      position: absolute;
746
      top: 0;
747
      height: 100%;
748
      font-size: $item-reorder-icon-size;
749
    }
750
  }
751
 
752
  display: block;
753
  opacity: 0;
754
  @include translate3d($item-right-edit-open-width *  1.5, 0, 0);
755
  &.visible {
756
    display: block;
757
    &.active {
758
      opacity: 1;
759
      @include translate3d(0, 0, 0);
760
    }
761
  }
762
}
763
 
764
 
765
// Item Reordering (Right side edit button)
766
// -------------------------------
767
 
768
.item-reorder .button.icon {
769
  color: $item-reorder-icon-color;
770
  font-size: $item-reorder-icon-size;
771
}
772
 
773
.item-reordering {
774
  // item is actively being reordered
775
  position: absolute;
776
  left: 0;
777
  top: 0;
778
  z-index: $z-index-item-reordering;
779
  width: 100%;
780
  box-shadow: 0px 0px 10px 0px #aaa;
781
 
782
  .item-reorder {
783
    z-index: $z-index-item-reordering;
784
  }
785
}
786
 
787
.item-placeholder {
788
  // placeholder for the item that's being reordered
789
  opacity: 0.7;
790
}
791
 
792
 
793
/**
794
 * The hidden right-side buttons that can be exposed under a list item
795
 * with dragging.
796
 */
797
.item-options {
798
  position: absolute;
799
  top: 0;
800
  right: 0;
801
  z-index: $z-index-item-options;
802
  height: 100%;
803
 
804
  .button {
805
    height: 100%;
806
    border: none;
807
    border-radius: 0;
808
    @include display-inline-flex();
809
    @include align-items(center);
810
 
811
    &:before{
812
      margin: 0 auto;
813
    }
814
  }
815
}