toolkit 2.0.0.alpha.5 → 2.0.0.alpha.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ecf52b7cd96045a054d8efd329aef0dc150f66e
4
- data.tar.gz: 1d6baa4f9b514df304de5a9cae4a8a5d1de48b85
3
+ metadata.gz: 8d22e665ee0df44a19d175a293a5ee373a3522f8
4
+ data.tar.gz: 415fbee67ecddc2a9b1103ebad05f2136fe4bc1c
5
5
  SHA512:
6
- metadata.gz: 2e7dc48c2d021da906edd7f6f1fad80ee8c4303ad5a62997555f27ea4a84242f5ce67317dc20bdb1bb4026472c37f96a5b147d2805dba342b41d8e2a15e7aa43
7
- data.tar.gz: 3c158501ec8c4a2b0b7ffbdbbf3f752ffea93516311890362c5543ad609426a3bb42c006105a280ea755baaba3890916c797c49020af26e2d786116df19f18f2
6
+ metadata.gz: 31cd53751a4cd8edefcd22dc001034d84023a3aac22909a62f7ad8ef5ac015844b01dcf40560efbbbc129799bf12a140d4b6c91157c73d1c3bb96cadef73ef50
7
+ data.tar.gz: 8096bb869890552555390e6c6ee31ce51c75270942e98267c18071aab982b71e3d75a2e4f1632d53302d7d001d767f39574f6f27e57db9e35944b4af13ed0cf5
@@ -12,6 +12,7 @@
12
12
  @import "toolkit/fonts";
13
13
  @import "toolkit/intrinsic-ratio";
14
14
  @import "toolkit/nested-context";
15
+ @import "toolkit/parallax";
15
16
  @import "toolkit/pe";
16
17
  @import "toolkit/properties";
17
18
  @import "toolkit/triangle";
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  @mixin intrinsic-ratio-ratio($ratio: null, $width: null, $direction: null) {
34
- $ratio: if($ratio != null, $ratio, toolkit-get('intrinsic ratio'));
34
+ $ratio: if($ration != null, $ratio, toolkit-get('intrinsic ratio'));
35
35
  $width: if($width != null, $width, toolkit-get('intrinsic ratio width'));
36
36
  $direction: if($direction != null, $direction, toolkit-get('intrinsic ratio direction'));
37
37
  padding-#{$direction}: (1 / $ratio) * $width;
@@ -39,9 +39,8 @@
39
39
  }
40
40
 
41
41
  @mixin intrinsic-ratio($ratio: null, $width: null, $elements: null, $direction: null, $extend: null) {
42
- $ratio: if($ratio != null, $ratio, toolkit-get('intrinsic ratio'));
42
+ $ratio: if($ration != null, $ratio, toolkit-get('intrinsic ratio'));
43
43
  $width: if($width != null, $width, toolkit-get('intrinsic ratio width'));
44
- $elements: if($elements != null, $elements, toolkit-get('intrinsic ratio elements'));
45
44
  $direction: if($direction != null, $direction, toolkit-get('intrinsic ratio direction'));
46
45
  $extend: if($extend != null, $extend, toolkit-get('intrinsic ratio extend'));
47
46
  @include intrinsic-ratio-parent($extend);
@@ -0,0 +1,53 @@
1
+ // Magic parallax mixins
2
+ @mixin parallax-init($perspective: null, $element: null, $parallax-ios: null) {
3
+
4
+ $perspective: if($perspective != null, $perspective, toolkit-get('parallax perspective'));
5
+ $element: if($element != null, $element, toolkit-get('parallax element'));
6
+ $parallax-ios: if($parallax-ios != null, $parallax-ios, toolkit-get('parallax ios'));
7
+
8
+ @if $element == 'body' {
9
+ html, body {
10
+ width: 100%;
11
+ height: 100%;
12
+ margin: 0;
13
+ padding: 0;
14
+ overflow: hidden;
15
+ }
16
+ }
17
+ #{$element} {
18
+ overflow: auto;
19
+ -webkit-perspective: $perspective * 1px;
20
+ -moz-perspective: $perspective * 1px;
21
+ -ms-perspective: $perspective * 1px;
22
+ -o-perspective: $perspective * 1px;
23
+ perspective: $perspective * 1px;
24
+ // Allows for smooth scrolling but disables parallax effects.
25
+ @if $parallax-ios == false {
26
+ -webkit-overflow-scrolling: touch;
27
+ }
28
+ // Make sure 3D perspective is preserved
29
+ &, & * {
30
+ -webkit-transform-style: preserve-3d;
31
+ -moz-transform-style: preserve-3d;
32
+ -ms-transform-style: preserve-3d;
33
+ -o-transform-style: preserve-3d;
34
+ transform-style: preserve-3d;
35
+ }
36
+ }
37
+ }
38
+
39
+ @mixin parallax($distance: null, $perspective: null) {
40
+
41
+ $distance: if($distance != null, $distance, toolkit-get('parallax distance'));
42
+ $perspective: if($perspective != null, $perspective, toolkit-get('parallax perspective'));
43
+
44
+ $transform: translateZ($distance * $perspective * 1px)
45
+ scale(abs($distance - 1));
46
+
47
+ -webkit-transform: $transform;
48
+ -moz-transform: $transform;
49
+ -ms-transform: $transform;
50
+ -o-transform: $transform;
51
+ transform: $transform;
52
+ z-index: $distance * 100;
53
+ }
@@ -21,7 +21,11 @@ $Toolkit-Settings: (
21
21
  'triangle color': #000,
22
22
  'triangle height': 1em,
23
23
  'triangle width': 1em,
24
- 'triangle angle': 0
24
+ 'triangle angle': 0,
25
+ 'parallax perspective': 1,
26
+ 'parallax element': 'body',
27
+ 'parallax ios': true,
28
+ 'parallax distance': 0,
25
29
  );
26
30
 
27
31
  //////////////////////////////
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.5
4
+ version: 2.0.0.alpha.6
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-01-16 00:00:00.000000000 Z
13
+ date: 2014-01-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass
@@ -58,6 +58,7 @@ files:
58
58
  - stylesheets/toolkit/_intrinsic-ratio.scss
59
59
  - stylesheets/toolkit/_kickstart.scss
60
60
  - stylesheets/toolkit/_nested-context.scss
61
+ - stylesheets/toolkit/_parallax.scss
61
62
  - stylesheets/toolkit/_pe.scss
62
63
  - stylesheets/toolkit/_properties.scss
63
64
  - stylesheets/toolkit/_selectors.scss