_functions.scss 744 Bytes
Newer Older
David Haynes's avatar
David Haynes committed
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
// Get a key from the primary-palette map
@function get-primary-palette($key) {
  @if map-has-key($primary-palette, $key) {
    @return map-get($primary-palette, $key);
  }
  
  @warn "Unknown `#{$key}` in $primary-palette.";
  @return null;
}

// Get a key from the universal-palette map
@function get-universal-palette($key) {
  @if map-has-key($universal-palette, $key) {
    @return map-get($universal-palette, $key);
  }
  
  @warn "Unknown `#{$key}` in $universal-palette.";
  @return null;
}

// Get a key from the neutral-palette map
@function get-neutral-palette($key) {
  @if map-has-key($neutral-palette, $key) {
    @return map-get($neutral-palette, $key);
  }
  
  @warn "Unknown `#{$key}` in $neutral-palette.";
  @return null;
}