compass-chameleon 0.1.1 → 0.2.0

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
- ZmFmMTQ1YTFlZjgzNWYxNjZiNWM5ZTczYWRkMzRhNTlhMTYxYjg1ZA==
4
+ ODAxZTkwZjNkNWRlMmVkZjYwNjQ0NmYxY2YwODk4ZGZkOTY2MjdiYw==
5
5
  data.tar.gz: !binary |-
6
- NDkwMTVlZDc0MDMwZWY4NjgwMTljMWJhOWFiZGE5NTUzYWEwMzYxZA==
6
+ MGQ5NzU0MWM0ZDdjZDhjMGJkMDExYmZiZTgwMTViZmE5ZjFiYzUyOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MWVhNDAzYWNhOTQwNTAwYzg2ZTU4OWRkODliZGU1MjUwNzkyZTQ2ZTBkMWJl
10
- ZjgxODRmYzMwMzhmNDMwNDk2NWNkNjM2NzhmMWVjOGY3Nzg1YWU5MWRmN2E5
11
- OWFiNjMxNWIyNjkxZGZlYWUyNjc2NWRiZWEyNGRkNjk5MTQ5ZmQ=
9
+ ZmQ2ZDVmNGJiOWZkMDE2MmY2ZmM4MWFjMzM3ZjI4NDNkYzBiM2UyMjNmZmFi
10
+ MWQ5NzdmMTAyOGRkOWJiZDEyYjA5ZDUxYmM0ZWY3YjNkMjdjYWNlZGU2OGM0
11
+ NWUyOWVmYzZjNjk4NjI0YWI3NGNmOTk2ZDk5MDA4YzIzMWQyNzg=
12
12
  data.tar.gz: !binary |-
13
- ODc5YTNmZTRjYzlkZWIwYWJmYmMwMjYwNzNlMzRjMWJkZmI2NzI4YjRkYWI2
14
- M2U3MzIxYzI4YzhmNWZlYzZmYWFjMWYzNjMwMWRiZGM0OGFkZWZlY2EzOTlh
15
- MThkYjBhNDY4MzdjYWQ3YTEwMGUxZmFiYjk1YzdjYzk0NWRhMzQ=
13
+ MjAzM2ZiYjcyZWYwMDAyMGFjYmU1ZWVkOGI2ZDhjYjIyMjU1MzI5MTg2Y2Q3
14
+ NzVlZDJlMTlhYTgwY2YxNDI5ZmQwOGQwOGY1NTgxMzNlYzc1NDdiN2M4MjQ5
15
+ ZmY3MzllNmVkYzI1MmRlZDhkMWRiNTVhZDlmOWQyMzc2M2ZjZTE=
@@ -1,3 +1,7 @@
1
+ # 0.2.0 (2013-07-19)
2
+
3
+ * Add unit tests
4
+
1
5
  # 0.1.1 (2013-07-19)
2
6
 
3
7
  * Fix non-working theme-color function
data/README.md CHANGED
@@ -151,6 +151,18 @@ Returns a theme by its name. Takes a theme name.
151
151
  }
152
152
  ```
153
153
 
154
+ ### `theme-colors`
155
+
156
+ Returns a list of the colors of the theme. Takes a theme.
157
+
158
+ ```scss
159
+ // First, look up the theme named 'red'
160
+ $theme: get-theme-by-name("red");
161
+ // Next, get the theme colors
162
+ $colors: theme-colors($theme);
163
+ // Then, use $colors in a for loop or whatever
164
+ ```
165
+
154
166
  ### `theme-color`
155
167
 
156
168
  Returns the desired color (primary, secondary etc.) of the specified theme. Takes a theme and the desired color by ordinal number (primary color is 1, secondary color is 2, tertiary color is 3 etc.).
@@ -54,6 +54,16 @@
54
54
  @return null;
55
55
  }
56
56
 
57
+ // Function theme-colors
58
+ // Returns the colors for a theme
59
+ //
60
+ // @param $theme {list} The theme to get the colors for
61
+ //
62
+ // @returns {list} The colors
63
+ @function theme-colors($theme) {
64
+ @return fail-safe-nth($theme, 2);
65
+ }
66
+
57
67
  // Function theme-color
58
68
  // Returns the desired color (primary, secondary etc.) of the specified theme.
59
69
  //
@@ -64,13 +74,7 @@
64
74
  // @return {color} The desired color
65
75
  //
66
76
  @function theme-color($theme, $color) {
67
- $index: index($themes, $theme);
68
- @if $index == false {
69
- @warn "Theme `#{$theme}` was not found in the list of themes.";
70
- @return null;
71
- }
72
-
73
- $colors: fail-safe-nth(nth($themes, $index), 2);
77
+ $colors: theme-colors($theme);
74
78
 
75
79
  @return fail-safe-nth($colors, $color);
76
80
  }
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.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leon de Rijke