summaryrefslogtreecommitdiff
path: root/scss/tests/files/general/007-maps-example.scss
blob: 5dfce63ac099e3fa5b91fc7ea930a5f4816c93ed (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
// Taken from the Ruby documentation
$themes: (
  mist: (
    header: #DCFAC0,
    text:   #00968B,
    border: #85C79C
  ),
  spring: (
    header: #F4FAC7,
    text:   #C2454E,
    border: #FFB158
  ),
  // ...
);

@mixin themed-header($theme-name) {
  h1 {
    color: map-get(map-get($themes, $theme-name), header);
  }
} 

div {
  @include themed-header(spring);
}