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 +8 -8
- data/CHANGELOG.md +4 -0
- data/README.md +12 -0
- data/stylesheets/chameleon/_functions.scss +11 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODAxZTkwZjNkNWRlMmVkZjYwNjQ0NmYxY2YwODk4ZGZkOTY2MjdiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGQ5NzU0MWM0ZDdjZDhjMGJkMDExYmZiZTgwMTViZmE5ZjFiYzUyOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmQ2ZDVmNGJiOWZkMDE2MmY2ZmM4MWFjMzM3ZjI4NDNkYzBiM2UyMjNmZmFi
|
10
|
+
MWQ5NzdmMTAyOGRkOWJiZDEyYjA5ZDUxYmM0ZWY3YjNkMjdjYWNlZGU2OGM0
|
11
|
+
NWUyOWVmYzZjNjk4NjI0YWI3NGNmOTk2ZDk5MDA4YzIzMWQyNzg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjAzM2ZiYjcyZWYwMDAyMGFjYmU1ZWVkOGI2ZDhjYjIyMjU1MzI5MTg2Y2Q3
|
14
|
+
NzVlZDJlMTlhYTgwY2YxNDI5ZmQwOGQwOGY1NTgxMzNlYzc1NDdiN2M4MjQ5
|
15
|
+
ZmY3MzllNmVkYzI1MmRlZDhkMWRiNTVhZDlmOWQyMzc2M2ZjZTE=
|
data/CHANGELOG.md
CHANGED
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
|
-
$
|
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
|
}
|