toolkit 2.0.0.alpha.6 → 2.0.0.alpha.7
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/stylesheets/_toolkit.scss +1 -0
- data/stylesheets/toolkit/_colors.scss +24 -0
- data/stylesheets/toolkit/_intrinsic-ratio.scss +11 -10
- data/stylesheets/toolkit/_parallax.scss +26 -20
- data/stylesheets/toolkit/_settings.scss +2 -3
- data/stylesheets/toolkit/_vertical-center.scss +16 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f70813b98ac50ccc010d27edb252293f537c38b
|
4
|
+
data.tar.gz: 6b6614ea726b941a77854e19f5d3c1cac4c77ba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdad416de492adb7637e43eb67e76b204683fe45cd2e45d65fac4c5e037a1ac3607f7103d0437a7146419ab7da41cb7eb5cc6d523c66114ad400087fa059be92
|
7
|
+
data.tar.gz: d66888767606a9afbfa544fd4cceef2148952eb3280aa85f520dab1e62d6d767860fe082206d6e6b9b67e4666828b5c59e5a12d61207a27eb8a8dbb520df02fc
|
data/stylesheets/_toolkit.scss
CHANGED
@@ -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, $
|
34
|
-
$ratio: if($
|
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
|
-
$
|
37
|
-
padding-#{$
|
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, $
|
42
|
-
$ratio: if($
|
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
|
-
$
|
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, $
|
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, $
|
58
|
-
@include intrinsic-ratio($ratio, $width, $elements, $extend, $
|
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
|
-
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
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.
|
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-
|
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
|