compass-chameleon 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTk3MmI1NDlhMDFmNmMzMGEzZDA4NWQ2Yjc3Yjg5MGM3M2MyNTMwOA==
4
+ ZmFmMTQ1YTFlZjgzNWYxNjZiNWM5ZTczYWRkMzRhNTlhMTYxYjg1ZA==
5
5
  data.tar.gz: !binary |-
6
- YTQ4MjEzZTBkY2YyMGM2ZjI3YWE2Zjg0MGJjNTllZWIxODU1ZGQxOA==
6
+ NDkwMTVlZDc0MDMwZWY4NjgwMTljMWJhOWFiZGE5NTUzYWEwMzYxZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MzI1ZjVkMTc2M2YxNjBhZDFiYTYyYmFlYzcyN2ZhM2RlMDJhNDVjMzdhMWM4
10
- MTM1N2I0NDJlOWM4OGY0NTcwZjc3YzA3N2IxMzIyYWY2YjZjMmMzNmU4YjQ4
11
- Mjk1Yjc1NjI2MDVkY2JhN2IwOGNiMzEwOWVlODRjZWExZGI5ZWM=
9
+ MWVhNDAzYWNhOTQwNTAwYzg2ZTU4OWRkODliZGU1MjUwNzkyZTQ2ZTBkMWJl
10
+ ZjgxODRmYzMwMzhmNDMwNDk2NWNkNjM2NzhmMWVjOGY3Nzg1YWU5MWRmN2E5
11
+ OWFiNjMxNWIyNjkxZGZlYWUyNjc2NWRiZWEyNGRkNjk5MTQ5ZmQ=
12
12
  data.tar.gz: !binary |-
13
- OTE4ZGI3ZDU1NjVkYTQ2OWQ2ZmRlODczMDFmN2NhOTVjNGUwOTg0ZDM4Y2Zj
14
- OTdlNzc0Y2UyOGQyMmNmNDM1MWI1ZjVkMzA5NzlhOGMzOGJlZjNlODBiZTM1
15
- N2ZhNmQwM2FkNThiMGUyODhkYzYwY2FlMmM1ZTQ3YmU4OWRmOGM=
13
+ ODc5YTNmZTRjYzlkZWIwYWJmYmMwMjYwNzNlMzRjMWJkZmI2NzI4YjRkYWI2
14
+ M2U3MzIxYzI4YzhmNWZlYzZmYWFjMWYzNjMwMWRiZGM0OGFkZWZlY2EzOTlh
15
+ MThkYjBhNDY4MzdjYWQ3YTEwMGUxZmFiYjk1YzdjYzk0NWRhMzQ=
@@ -1,3 +1,7 @@
1
- # 0.1.0
1
+ # 0.1.1 (2013-07-19)
2
+
3
+ * Fix non-working theme-color function
4
+
5
+ # 0.1.0 (2013-07-19)
2
6
 
3
7
  Initial working version.
data/README.md CHANGED
@@ -9,7 +9,11 @@ reuse the general styles and only change colors based on the theme.
9
9
 
10
10
  ## Installation
11
11
 
12
- TODO: Release as gem and provide installation instructions.
12
+ Install Chameleon by:
13
+
14
+ ```bash
15
+ $ gem install compass-chameleon
16
+ ```
13
17
 
14
18
  ## Usage
15
19
 
@@ -57,17 +57,20 @@
57
57
  // Function theme-color
58
58
  // Returns the desired color (primary, secondary etc.) of the specified theme.
59
59
  //
60
- // @param $theme {string} Theme name as used in HTML
61
- // @param $index {number} Desired color by ordinal number (primary color is 1, secondary color
60
+ // @param $theme {list} The theme
61
+ // @param $color {number} Desired color by ordinal number (primary color is 1, secondary color
62
62
  // is 2, tertiary color is 3 etc.)
63
63
  //
64
64
  // @return {color} The desired color
65
65
  //
66
- @function theme-color($theme, $index) {
67
- @if index($themes, $theme) == false {
66
+ @function theme-color($theme, $color) {
67
+ $index: index($themes, $theme);
68
+ @if $index == false {
68
69
  @warn "Theme `#{$theme}` was not found in the list of themes.";
69
70
  @return null;
70
71
  }
71
72
 
72
- @return fail-safe-nth(index($themes, $theme), $index);
73
+ $colors: fail-safe-nth(nth($themes, $index), 2);
74
+
75
+ @return fail-safe-nth($colors, $color);
73
76
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-chameleon
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon de Rijke