toolkit 2.0.0.alpha.6 → 2.0.0.alpha.7

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: 8d22e665ee0df44a19d175a293a5ee373a3522f8
4
- data.tar.gz: 415fbee67ecddc2a9b1103ebad05f2136fe4bc1c
3
+ metadata.gz: 0f70813b98ac50ccc010d27edb252293f537c38b
4
+ data.tar.gz: 6b6614ea726b941a77854e19f5d3c1cac4c77ba9
5
5
  SHA512:
6
- metadata.gz: 31cd53751a4cd8edefcd22dc001034d84023a3aac22909a62f7ad8ef5ac015844b01dcf40560efbbbc129799bf12a140d4b6c91157c73d1c3bb96cadef73ef50
7
- data.tar.gz: 8096bb869890552555390e6c6ee31ce51c75270942e98267c18071aab982b71e3d75a2e4f1632d53302d7d001d767f39574f6f27e57db9e35944b4af13ed0cf5
6
+ metadata.gz: cdad416de492adb7637e43eb67e76b204683fe45cd2e45d65fac4c5e037a1ac3607f7103d0437a7146419ab7da41cb7eb5cc6d523c66114ad400087fa059be92
7
+ data.tar.gz: d66888767606a9afbfa544fd4cceef2148952eb3280aa85f520dab1e62d6d767860fe082206d6e6b9b67e4666828b5c59e5a12d61207a27eb8a8dbb520df02fc
@@ -16,4 +16,5 @@
16
16
  @import "toolkit/pe";
17
17
  @import "toolkit/properties";
18
18
  @import "toolkit/triangle";
19
+ @import "toolkit/vertical-center";
19
20
  @import "toolkit/viewport";
@@ -53,6 +53,30 @@
53
53
  }
54
54
  }
55
55
 
56
+ // Tint/Shade Stack
57
+ @function tint-shade-stack($color, $amounts...) {
58
+ $colors: ();
59
+ @if length($amounts) == 0 {
60
+ $amounts: toolkit-get('tint shade amounts');
61
+ }
62
+ $length: length($amounts);
63
+
64
+ // Shades
65
+ @for $i from 1 through $length {
66
+ $colors: append($colors, shade($color, nth($amounts, $i)));
67
+ }
68
+
69
+ // Base
70
+ $colors: append($colors, $color);
71
+
72
+ // Tints
73
+ @for $i from 0 through $length - 1 {
74
+ $colors: append($colors, tint($color, nth($amounts, $length - $i)));
75
+ }
76
+
77
+ @return $colors;
78
+ }
79
+
56
80
  //////////////////////////////
57
81
  // Color Scales
58
82
  //////////////////////////////
@@ -30,22 +30,23 @@
30
30
  }
31
31
  }
32
32
 
33
- @mixin intrinsic-ratio-ratio($ratio: null, $width: null, $direction: null) {
34
- $ratio: if($ration != null, $ratio, toolkit-get('intrinsic ratio'));
33
+ @mixin intrinsic-ratio-ratio($ratio: null, $width: null, $position: null) {
34
+ $ratio: if($ratio != null, $ratio, toolkit-get('intrinsic ratio'));
35
35
  $width: if($width != null, $width, toolkit-get('intrinsic ratio width'));
36
- $direction: if($direction != null, $direction, toolkit-get('intrinsic ratio direction'));
37
- padding-#{$direction}: (1 / $ratio) * $width;
36
+ $position: if($position != null, $position, toolkit-get('intrinsic ratio direction'));
37
+ padding-#{$position}: (1 / $ratio) * $width;
38
38
  width: $width;
39
39
  }
40
40
 
41
- @mixin intrinsic-ratio($ratio: null, $width: null, $elements: null, $direction: null, $extend: null) {
42
- $ratio: if($ration != null, $ratio, toolkit-get('intrinsic ratio'));
41
+ @mixin intrinsic-ratio($ratio: null, $width: null, $elements: null, $position: null, $extend: null) {
42
+ $ratio: if($ratio != null, $ratio, toolkit-get('intrinsic ratio'));
43
43
  $width: if($width != null, $width, toolkit-get('intrinsic ratio width'));
44
- $direction: if($direction != null, $direction, toolkit-get('intrinsic ratio direction'));
44
+ $elements: if($elements != null, $elements, toolkit-get('intrinsic ratio elements'));
45
+ $position: if($position != null, $position, toolkit-get('intrinsic ratio direction'));
45
46
  $extend: if($extend != null, $extend, toolkit-get('intrinsic ratio extend'));
46
47
  @include intrinsic-ratio-parent($extend);
47
48
 
48
- @include intrinsic-ratio-ratio($ratio, $width, $direction);
49
+ @include intrinsic-ratio-ratio($ratio, $width, $position);
49
50
 
50
51
  @each $element in $elements {
51
52
  #{$element} {
@@ -54,8 +55,8 @@
54
55
  }
55
56
  }
56
57
 
57
- @mixin ir($ratio: null, $width: null, $elements: null, $direction: null, $extend: null) {
58
- @include intrinsic-ratio($ratio, $width, $elements, $extend, $direction);
58
+ @mixin ir($ratio: null, $width: null, $elements: null, $position: null, $extend: null) {
59
+ @include intrinsic-ratio($ratio, $width, $elements, $extend, $position);
59
60
  }
60
61
 
61
62
  %intrinsic-ratio-parent {
@@ -1,6 +1,6 @@
1
1
  // Magic parallax mixins
2
2
  @mixin parallax-init($perspective: null, $element: null, $parallax-ios: null) {
3
-
3
+
4
4
  $perspective: if($perspective != null, $perspective, toolkit-get('parallax perspective'));
5
5
  $element: if($element != null, $element, toolkit-get('parallax element'));
6
6
  $parallax-ios: if($parallax-ios != null, $parallax-ios, toolkit-get('parallax ios'));
@@ -16,38 +16,44 @@
16
16
  }
17
17
  #{$element} {
18
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;
19
+ @if mixin-exists(perspective) {
20
+ @include perspective($perspective * 1px);
21
+ }
22
+ @else {
23
+ -webkit-perspective: $perspective * 1px;
24
+ perspective: $perspective * 1px;
25
+ }
24
26
  // Allows for smooth scrolling but disables parallax effects.
25
27
  @if $parallax-ios == false {
26
28
  -webkit-overflow-scrolling: touch;
27
29
  }
28
30
  // Make sure 3D perspective is preserved
29
31
  &, & * {
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;
32
+ @if mixin-exists(transform-style) {
33
+ @include transform-style(preserve-3d);
34
+ }
35
+ @else {
36
+ -webkit-transform-style: preserve-3d;
37
+ transform-style: preserve-3d;
38
+ }
35
39
  }
36
40
  }
37
41
  }
38
42
 
39
43
  @mixin parallax($distance: null, $perspective: null) {
40
-
44
+
41
45
  $distance: if($distance != null, $distance, toolkit-get('parallax distance'));
42
46
  $perspective: if($perspective != null, $perspective, toolkit-get('parallax perspective'));
43
-
44
- $transform: translateZ($distance * $perspective * 1px)
45
- scale(abs($distance - 1));
46
47
 
47
- -webkit-transform: $transform;
48
- -moz-transform: $transform;
49
- -ms-transform: $transform;
50
- -o-transform: $transform;
51
- transform: $transform;
48
+ $transform: translateZ($distance * $perspective * 1px) scale(abs($distance - 1));
49
+
50
+ @if mixin-exists(transform) {
51
+ @include transform($transform);
52
+ }
53
+ @else {
54
+ -webkit-transform: $transform;
55
+ transform: $transform;
56
+ }
57
+
52
58
  z-index: $distance * 100;
53
59
  }
@@ -4,6 +4,7 @@
4
4
  $Toolkit-Settings: (
5
5
  'clearfix extend': false,
6
6
  'color stack amounts': 25% 50% 75% 85% 90%,
7
+ 'tint shade amounts': 75% 50% 25%,
7
8
  'tint color': #fff,
8
9
  'shade color': #000,
9
10
  'color scale shades': 6,
@@ -26,6 +27,7 @@ $Toolkit-Settings: (
26
27
  'parallax element': 'body',
27
28
  'parallax ios': true,
28
29
  'parallax distance': 0,
30
+ 'vertical midpoint': 50%,
29
31
  );
30
32
 
31
33
  //////////////////////////////
@@ -33,9 +35,6 @@ $Toolkit-Settings: (
33
35
  //////////////////////////////
34
36
  $toolkit: () !default;
35
37
 
36
- //////////////////////////////
37
- // Has Setting
38
- //////////////////////////////
39
38
  //////////////////////////////
40
39
  // Has Setting
41
40
  //////////////////////////////
@@ -0,0 +1,16 @@
1
+ // Vertically center anything, literally anything.
2
+ // http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
3
+ @mixin vertical-center($midpoint: null) {
4
+
5
+ $midpoint: if($midpoint != null, $midpoint, toolkit-get('vertical midpoint'));
6
+
7
+ position: relative;
8
+ top: $midpoint;
9
+ @if mixin-exists(transform) {
10
+ @include transform(translateY(-50%));
11
+ } @else {
12
+ -webkit-transform: translateY(-50%);
13
+ -ms-transform: translateY(-50%);
14
+ transform: translateY(-50%);
15
+ }
16
+ }
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.6
4
+ version: 2.0.0.alpha.7
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-26 00:00:00.000000000 Z
13
+ date: 2014-01-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass
@@ -64,6 +64,7 @@ files:
64
64
  - stylesheets/toolkit/_selectors.scss
65
65
  - stylesheets/toolkit/_settings.scss
66
66
  - stylesheets/toolkit/_triangle.scss
67
+ - stylesheets/toolkit/_vertical-center.scss
67
68
  - stylesheets/toolkit/_viewport.scss
68
69
  - LICENSE.txt
69
70
  homepage: https://github.com/Snugug/toolkit