summaryrefslogtreecommitdiffstats
path: root/afm-client/bower_components/foundation-apps/scss/components/_iconic.scss
blob: e2904583c1e82cf7f16e1160dd1dee2cd5e4df1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// ICONIC
// ------
//
// A sample of 24 flexible, easily schemable icons from the folks at Iconic.
// 
// Features:
//  - 24 icons
//  - Built-in coloring and sizing classes
//  - Coloring mixin
//  - Angular support

/// @Foundation.settings
// Iconic
$iconic-primary-fill: $primary-color !default;
$iconic-primary-stroke: $primary-color !default;
$iconic-accent-fill: $iconic-primary-fill !default;
$iconic-accent-stroke: $iconic-accent-fill !default;
///

// Colors the fill, and optionally stroke, accent fill, and accent stroke of an Iconic icon.
@mixin color-icon(
  $fill,
  $stroke: null,
  $fillAccent: null,
  $strokeAccent: null
) {
  * {
    fill: $fill;

    // Use the fill color if no stroke is provided
    @if hasvalue($stroke) {
      stroke: $stroke;
    }
    @else {
      stroke: $fill;
    }

    &.iconic-property-accent {
      // Use the fill color if no accent is provided
      @if hasvalue($fillAccent) {
        fill: $fillAccent;
      }
      @else {
        fill: $fill;
      }

      // Use the normal stroke color if no accent is provided
      @if hasvalue($strokeAccent) {
        stroke: $strokeAccent;
      }
      @else {
        // ...or use the fill if no normal stroke is provided
        @if hasvalue($stroke) {
          stroke: $stroke;
        }
        @else {
          stroke: $fill;
        }
      }
    }
  }
}

@include exports(iconic) {
  .iconic {
    width: 1rem;
    height: 1rem;
    vertical-align: middle;

    a > & {
      @include color-icon($primary-color);
      margin-top: -2px;
      margin-right: 0.25rem;
    }
  }

  .iconic * {
    fill: $iconic-primary-fill;
    stroke: $iconic-primary-stroke;

    &.iconic-property-accent {
      fill: $iconic-accent-fill;
      stroke: $iconic-accent-stroke;
    }
  }

  @each $color in map-keys($foundation-colors) {
    .iconic-color-#{$color} {
      @include color-icon(map-get($foundation-colors, $color));
    }
  }
  .iconic-color-secondary {
    @include color-icon($secondary-color);
  }
}