toolkit 2.0.0.alpha.8 → 2.0.0.alpha.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5505918394736ce9fa000c1fdbd0a68fd0bcf181
4
- data.tar.gz: e3a047b92920b2bca2ba54041c92826e29d43899
3
+ metadata.gz: 586cd980fb570a6466d1b4c1c1a9af50ecec1b75
4
+ data.tar.gz: e3de855fd5bf748c8ac4b6b2c7b65e0dc045c3f9
5
5
  SHA512:
6
- metadata.gz: 425ebc656b869e115d34ad29e0a2da038309e8d4aa317224e65549d535b4440feca987785b679cea1e3044f0bf08a762971fe20c85b5ee086e809485c699b6aa
7
- data.tar.gz: ac4c3093b00fb2db1c52a1f553afc1ff7a3f80269d5910add0c862b419cbcc80a36c801396aba48d6f397323587fcbf00fa46ee5dbf7ec612ad8e301a476bef3
6
+ metadata.gz: 556e3656801aa753ca0ffcf373192216e0f48de93ee2eb4579bef3daafb6bea26c368eb61b2b9dcdedaf4071fee915788a5551e2aab3e97b2b1076f3fbaafc8d
7
+ data.tar.gz: 066c0b6071c9d7e98368b7d5aa9e577d8735814f9a21bc1b3e848133ba99e1e871e0f9ba19ee0e49d7e6f625a3a9245315d33d35a36ae7bbc295a08f8fdc528d
@@ -3,16 +3,26 @@
3
3
  //
4
4
  // - $feature: Modernizr feature (base CSS class name)
5
5
  ////////////////////////
6
- @mixin enhance-with($features) {
7
- $ft: '';
8
- @each $feature in $features {
9
- $ft: $ft + '.#{$feature}, '
10
- }
11
-
12
- $ft: str-slice($ft, -2);
6
+ @mixin enhance-with($features, $extend: null) {
7
+ $extend: if($extend != null, $extend, toolkit-get('enhance with extend'));
13
8
 
14
- .#{$ft} & {
15
- @content;
9
+ @if $extend {
10
+ $uid: unique-id();
11
+ @at-root %#{$uid} {
12
+ @content;
13
+ }
14
+ @each $feature in $features {
15
+ .#{$feature} & {
16
+ @extend %#{$uid};
17
+ }
18
+ }
19
+ }
20
+ @else {
21
+ @each $feature in $features {
22
+ .#{$feature} & {
23
+ @content;
24
+ }
25
+ }
16
26
  }
17
27
  }
18
28
 
@@ -21,23 +31,39 @@
21
31
  //
22
32
  // - $feature: Modernizr feature (base CSS class name)
23
33
  ////////////////////////
24
- @mixin degrade-from($features, $no-js: null) {
25
- $ft: '';
26
- @each $feature in $features {
27
- $ft: $ft + '.no-#{$feature}, '
28
- }
29
-
34
+ @mixin degrade-from($features, $no-js: null, $extend: null) {
30
35
  $no-js: if($no-js != null, $no-js, toolkit-get('degrade from javascript'));
36
+ $extend: if($extend != null, $extend, toolkit-get('degrade from extend'));
31
37
 
32
- @if $feature == 'js' or not $no-js {
33
- #{$ft} & {
38
+ @if $extend {
39
+ $uid: unique-id();
40
+ @at-root %#{$uid} {
34
41
  @content;
35
42
  }
43
+
44
+ @each $feature in $features {
45
+ .no-#{$feature} & {
46
+ @extend %#{$uid};
47
+ }
48
+ }
49
+
50
+ @if not index($features, 'js') and $no-js != true {
51
+ .no-js & {
52
+ @extend %#{$uid};
53
+ }
54
+ }
36
55
  }
37
56
  @else {
38
- #{$ft} &,
39
- .no-js & {
40
- @content;
57
+ @each $feature in $features {
58
+ .no-#{$feature} & {
59
+ @content;
60
+ }
61
+ }
62
+
63
+ @if not index($features, 'js') and $no-js != true {
64
+ .no-js & {
65
+ @content;
66
+ }
41
67
  }
42
68
  }
43
69
  }
@@ -19,6 +19,8 @@ $Toolkit-Settings: (
19
19
  'intrinsic ratio extend': false,
20
20
  'nested context contexts': 100%,
21
21
  'nested context position': left,
22
+ 'enhance with extend': true,
23
+ 'degrade from extend': true,
22
24
  'degrade from javascript': false,
23
25
  'triangle color': #000,
24
26
  'triangle height': 1em,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha.8
4
+ version: 2.0.0.alpha.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Richard
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-02-08 00:00:00.000000000 Z
13
+ date: 2014-02-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass