chroma-sass 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/chroma-sass.gemspec +2 -2
- data/sass/chroma/_functions.scss +43 -36
- data/sass/chroma/_skin.scss +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ceadf1166d4eed5e358a52f1cf37051b66c664d
|
4
|
+
data.tar.gz: d86c220ce440325800a5bfb9302e9bcdb47dcab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb4741cf26f39a898aab712e9dc960cbff2739a860f31f05fbd04e516bcdb957616485f9d0ad2083a6386ffb8df8579fedd394a6c205d945c710786c236736c
|
7
|
+
data.tar.gz: 5050e3b0efa2b7cba7b1252d21bb38acdb8852b89d313b842c53a25f2b7656b7cbf6b5a261dad6e46db528d3997cad019a7ce5bbe046c2194ddb053406e5c853
|
data/chroma-sass.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.homepage = 'http://github.com/JohnAlbin/chroma'
|
10
10
|
spec.rubyforge_project =
|
11
11
|
|
12
|
-
spec.version = '1.1.
|
13
|
-
spec.date = '2015-09-
|
12
|
+
spec.version = '1.1.2'
|
13
|
+
spec.date = '2015-09-27'
|
14
14
|
spec.licenses = ['GPL-2']
|
15
15
|
|
16
16
|
spec.authors = ['John Albin Wilkins']
|
data/sass/chroma/_functions.scss
CHANGED
@@ -253,10 +253,12 @@ $chroma: _chroma-init();
|
|
253
253
|
))
|
254
254
|
);
|
255
255
|
|
256
|
-
|
256
|
+
$chroma: map-merge(
|
257
257
|
$chroma,
|
258
258
|
('schemes': $schemes)
|
259
|
-
);
|
259
|
+
) !global;
|
260
|
+
|
261
|
+
@return $chroma;
|
260
262
|
}
|
261
263
|
|
262
264
|
// define-default-color-scheme([$name,] $description)
|
@@ -302,7 +304,7 @@ $chroma: _chroma-init();
|
|
302
304
|
}
|
303
305
|
$CHROMA_DEFAULT_SCHEME: $name !global;
|
304
306
|
// Add the default scheme (and the updated schemes) back into $chroma.
|
305
|
-
|
307
|
+
$chroma: map-merge(
|
306
308
|
$chroma,
|
307
309
|
('schemes': map-merge(
|
308
310
|
$schemes,
|
@@ -311,7 +313,9 @@ $chroma: _chroma-init();
|
|
311
313
|
'parent': false,
|
312
314
|
))
|
313
315
|
))
|
314
|
-
);
|
316
|
+
) !global;
|
317
|
+
|
318
|
+
@return $chroma;
|
315
319
|
}
|
316
320
|
|
317
321
|
// add-colors([$scheme,] $colors)
|
@@ -437,38 +441,11 @@ $chroma: _chroma-init();
|
|
437
441
|
@return $chroma;
|
438
442
|
}
|
439
443
|
|
440
|
-
// define-skin($scheme, $selector)
|
441
|
-
//
|
442
|
-
// Defines that the specified color scheme can be used as a skin when the
|
443
|
-
// given parent selector matches our HTML. See the `skin()` mixin.
|
444
|
-
//
|
445
|
-
// Usage:
|
446
|
-
// ```scss
|
447
|
-
// $chroma: define-skin('scheme1', '.is-scheme1-skin');
|
448
|
-
// ```
|
449
|
-
//
|
450
|
-
// $scheme - Name of the color scheme to use when the `$selector` matches our
|
451
|
-
// HTML.
|
452
|
-
// $selector - A CSS parent selector that triggers the use of the defined
|
453
|
-
// `$scheme` instead of the default color scheme. We recommend using
|
454
|
-
// a simple CSS selector like `.is-CUSTOMNAME-skin`.
|
455
|
-
//
|
456
|
-
// Style guide: skin.define-skin
|
457
|
-
@function define-skin($scheme, $selector) {
|
458
|
-
$skins: map-merge(
|
459
|
-
map-get($chroma, 'skins'),
|
460
|
-
($scheme: $selector)
|
461
|
-
);
|
462
|
-
|
463
|
-
@return map-merge(
|
464
|
-
$chroma,
|
465
|
-
('skins': $skins)
|
466
|
-
);
|
467
|
-
}
|
468
|
-
|
469
444
|
// define-skins($skins)
|
470
445
|
//
|
471
|
-
//
|
446
|
+
// Defines one or more color schemes as being a skin. For each of the specified
|
447
|
+
// color schemes, `define-skins()` will tell Chroma to use the scheme with the
|
448
|
+
// corresponding CSS selector when the `skin()` mixin is used.
|
472
449
|
//
|
473
450
|
// Usage:
|
474
451
|
// ```scss
|
@@ -479,12 +456,42 @@ $chroma: _chroma-init();
|
|
479
456
|
// ));
|
480
457
|
// ```
|
481
458
|
//
|
482
|
-
// $skins - A
|
459
|
+
// $skins - A map of color schemes and their CSS parent selectors. Each key in
|
460
|
+
// the map must be the name of an existing color scheme. The value of each key
|
461
|
+
// is the CSS parent selector that triggers the use of the defined scheme
|
462
|
+
// instead of the default color scheme. We recommend using a simple CSS selector
|
463
|
+
// like `.is-CUSTOMNAME-skin`.
|
483
464
|
//
|
484
465
|
// Style guide: skin.define-skins
|
485
466
|
@function define-skins($skins) {
|
486
467
|
@each $scheme, $selector in $skins {
|
487
|
-
|
468
|
+
@if not chroma-has-scheme($scheme) {
|
469
|
+
@error 'The #{$_chroma-spelling} scheme "#{$scheme}" was not found.';
|
470
|
+
}
|
471
|
+
@if type-of($selector) != 'string' {
|
472
|
+
@error 'The selector for the #{$scheme} skin was a #{type-of($selector)}, but should be a string.';
|
473
|
+
}
|
488
474
|
}
|
475
|
+
|
476
|
+
$chroma: map-merge(
|
477
|
+
$chroma,
|
478
|
+
('skins': map-merge(
|
479
|
+
map-get($chroma, 'skins'),
|
480
|
+
$skins
|
481
|
+
))
|
482
|
+
) !global;
|
483
|
+
|
489
484
|
@return $chroma;
|
490
485
|
}
|
486
|
+
|
487
|
+
// define-skin($scheme, $selector)
|
488
|
+
//
|
489
|
+
// Deprecated: Will be removed in Chroma 2.0.0. Use `define-skins()` instead.
|
490
|
+
//
|
491
|
+
// Weight: 100
|
492
|
+
//
|
493
|
+
// Style guide: skin.define-skin
|
494
|
+
@function define-skin($scheme, $selector) {
|
495
|
+
@warn "The define-skin() function is deprecated. Use define-skins() instead.";
|
496
|
+
@return define-skins(($scheme: $selector));
|
497
|
+
}
|
data/sass/chroma/_skin.scss
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
// ```
|
39
39
|
//
|
40
40
|
// $skins - An optional list of color scheme names and selectors to use instead
|
41
|
-
// of the skins defined with `define-
|
41
|
+
// of the skins defined with `define-skins()`. The format of this list
|
42
42
|
// should match that of the `$skins` parameter in `define-skins()`.
|
43
43
|
//
|
44
44
|
// Style guide: skin.skin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chroma-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Albin Wilkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
rubyforge_project: 1.1.
|
64
|
+
rubyforge_project: 1.1.2
|
65
65
|
rubygems_version: 2.4.8
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|