toolkit 1.3.8 → 2.0.0.alpha.1

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.
Files changed (47) hide show
  1. checksums.yaml +7 -7
  2. data/lib/toolkit.rb +1 -13
  3. data/stylesheets/_toolkit.scss +12 -68
  4. data/stylesheets/toolkit/_clearfix.scss +11 -95
  5. data/stylesheets/toolkit/_colors.scss +89 -1
  6. data/stylesheets/toolkit/_element-query.scss +13 -5
  7. data/stylesheets/toolkit/_fonts.scss +26 -8
  8. data/stylesheets/toolkit/_intrinsic-ratio.scss +15 -10
  9. data/stylesheets/toolkit/_kickstart.scss +14 -0
  10. data/stylesheets/toolkit/_nested-context.scss +8 -7
  11. data/stylesheets/toolkit/_pe.scss +19 -226
  12. data/stylesheets/toolkit/_selectors.scss +0 -25
  13. data/stylesheets/toolkit/_settings.scss +90 -0
  14. data/stylesheets/toolkit/_triangle.scss +7 -2
  15. data/stylesheets/toolkit/_viewport.scss +6 -16
  16. metadata +46 -105
  17. data/stylesheets/_toolkit-no-css.scss +0 -69
  18. data/stylesheets/toolkit/_border-box.scss +0 -6
  19. data/stylesheets/toolkit/_box-sizing.scss +0 -42
  20. data/stylesheets/toolkit/_carousel.scss +0 -155
  21. data/stylesheets/toolkit/_children-of-ie.scss +0 -26
  22. data/stylesheets/toolkit/_colours.scss +0 -102
  23. data/stylesheets/toolkit/_debug.scss +0 -25
  24. data/stylesheets/toolkit/_equal-height-columns.scss +0 -56
  25. data/stylesheets/toolkit/_fluid-media.scss +0 -7
  26. data/stylesheets/toolkit/_vertical-center.scss +0 -23
  27. data/templates/box-sizing/behaviors/box-sizing/boxsizing.htc +0 -399
  28. data/templates/box-sizing/behaviors/box-sizing/boxsizing.php +0 -23
  29. data/templates/box-sizing/manifest.rb +0 -4
  30. data/templates/project/_base.scss +0 -26
  31. data/templates/project/manifest.rb +0 -57
  32. data/templates/rwd/_base.scss +0 -27
  33. data/templates/rwd/manifest.rb +0 -60
  34. data/templates/shared/_design.scss +0 -9
  35. data/templates/shared/_extendables.scss +0 -6
  36. data/templates/shared/_functions.scss +0 -5
  37. data/templates/shared/_ie-design.scss +0 -9
  38. data/templates/shared/_ie-layout.scss +0 -9
  39. data/templates/shared/_layout.scss +0 -9
  40. data/templates/shared/_mixins.scss +0 -5
  41. data/templates/shared/_print-design.scss +0 -9
  42. data/templates/shared/_print-layout.scss +0 -9
  43. data/templates/shared/_style-guide.scss +0 -10
  44. data/templates/shared/_variables.scss +0 -5
  45. data/templates/shared/ie.scss +0 -32
  46. data/templates/shared/print.scss +0 -28
  47. data/templates/shared/style.scss +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA512:
3
- data.tar.gz: ddc498458198f3b8bf3970e0ff5717664bde1d4e10b016e269f3dbdc756e14e8b22dfff256f96d031499710c28617332e3e2bb2b51022cc90cae936b3dd1029b
4
- metadata.gz: f91b3ae4798075e4042e40e0f0125be9bc2dc95349950a844a9155d3045f89f04aa36fe3d23ffc0697c8a47985afac32b7070d51d28a79cc1409b795d608390a
5
- SHA1:
6
- data.tar.gz: a33119eb8b6be09f497ab5acfdea6cb23d186809
7
- metadata.gz: 28749208bf89321c492108bbda9cbf49e80b6e73
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c0d0e6f2a5c79279593c18b5def0e890c767a40b
4
+ data.tar.gz: 5c32b09ced919eac8881623bd3e6bfb6f220e0c1
5
+ SHA512:
6
+ metadata.gz: 74324bbe9569bc5fd301eda6bd296c00d4f175a6651bf9519b317f159675b081a47dbc2d822948d2645147da9d2f9d22393ce24f93497b8eef4b316373cfdf70
7
+ data.tar.gz: 3e2e4bcf5a7e4a707e35374981722b1ec03e65dfca4c4922bcc312ef6ad0846decaffff7f8c432d0cd861b8fced49ec6d1d44295c59a639c6a38579b723009b1
data/lib/toolkit.rb CHANGED
@@ -1,16 +1,4 @@
1
1
  require 'compass'
2
- require 'singularitygs'
3
- require 'sassy-strings'
4
- require 'color-schemer'
5
2
 
6
3
  extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
7
- Compass::Frameworks.register('toolkit', :path => extension_path)
8
-
9
- module Sass::Script::Functions
10
- def children_of_ie_nth(input)
11
- n = "n"
12
- b = ""
13
- result = input.value.gsub(n, b)
14
- Sass::Script::Number.new(result.to_i)
15
- end
16
- end
4
+ Compass::Frameworks.register('toolkit', :path => extension_path)
@@ -1,74 +1,18 @@
1
- ////////////////////////
2
- // Compass Imports
3
- ////////////////////////
4
- @import 'compass';
5
-
6
- ////////////////////////
7
- // Import Border Box Awesomesauce
8
- ////////////////////////
9
- @import 'toolkit/border-box';
10
-
11
- ////////////////////////
12
- // Import Fluid Media
13
- ////////////////////////
14
- @import 'toolkit/fluid-media';
15
-
16
- ////////////////////////
17
- // Import Intrinsic Ratio
18
- ////////////////////////
19
- @import 'toolkit/intrinsic-ratio';
20
-
21
- ////////////////////////
22
- // Import Nested Context
23
- ////////////////////////
24
- @import 'toolkit/nested-context';
25
-
26
- ////////////////////////
27
- // Import Progressive Enhancement
28
- ////////////////////////
29
- @import 'toolkit/pe';
30
-
31
- //////////////////////////////
32
- // Import Clearfix
33
1
  //////////////////////////////
34
- @import 'toolkit/clearfix';
35
-
36
- //////////////////////////////
37
- // Import Vertical Center
2
+ // Toolkit Settings
38
3
  //////////////////////////////
39
- @import 'toolkit/vertical-center';
4
+ @import "toolkit/settings";
40
5
 
41
6
  //////////////////////////////
42
- // Import Color Helpers
43
- //////////////////////////////
44
- @import 'toolkit/colours';
45
-
46
- //////////////////////////////
47
- // Import Triangle
48
- //////////////////////////////
49
- @import 'toolkit/triangle';
50
-
51
- //////////////////////////////
52
- // Import Selector Awesomeness
53
- //////////////////////////////
54
- @import "toolkit/selectors";
55
-
56
- //////////////////////////////
57
- // Import Equal Height Columns
58
- //////////////////////////////
59
- @import "toolkit/equal-height-columns";
60
-
61
- //////////////////////////////
62
- // Import Fonts
7
+ // Imports
63
8
  //////////////////////////////
9
+ @import "toolkit/clearfix";
10
+ @import "toolkit/colors";
11
+ @import "toolkit/element-query";
64
12
  @import "toolkit/fonts";
65
-
66
- //////////////////////////////
67
- // Viewport
68
- //////////////////////////////
69
- @import "toolkit/viewport";
70
-
71
- //////////////////////////////
72
- // Element Query
73
- //////////////////////////////
74
- @import "toolkit/element-query";
13
+ @import "toolkit/intrinsic-ratio";
14
+ @import "toolkit/nested-context";
15
+ @import "toolkit/pe";
16
+ @import "toolkit/properties";
17
+ @import "toolkit/triangle";
18
+ @import "toolkit/viewport";
@@ -1,104 +1,20 @@
1
1
  //////////////////////////////
2
- // Massive Clearfix Mixin
3
- //
4
- // Clearfix mixin for all of your clearfixing needs. Will choose the right mixin for you.
5
- // Can choose whether to extend or to write.
2
+ // Modern Clearfix Mixin
6
3
  //////////////////////////////
7
- $clearfix-extend: false !default;
8
- $clearfix-direct: false !default;
9
- $toolkit-clearfix: true;
10
-
11
- @mixin cf($extend: $clearfix-extend, $direct: $clearfix-direct) {
12
- @include clearfix($extend, $direct);
13
- }
14
-
15
- @mixin clearfix($extend: $clearfix-extend, $direct: $clearfix-direct) {
16
- @if (($legacy-support-for-ie6 or $legacy-support-for-ie7) and not $legacy-support-for-mozilla and $direct != 'legacy' and $direct != 'modern') or ($direct == 'micro') {
17
- @if $extend {
18
- @extend %clearfix-micro;
19
- }
20
- @else {
21
- /* for IE 6/7 */
22
- *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
23
- /* non-JS fallback */
24
- *zoom: 1;
25
-
26
- &:before,
27
- &:after {
28
- content: "";
29
- display: table;
30
- }
31
-
32
- &:after {
33
- clear: both;
34
- }
35
- }
36
- }
37
- @else if (($legacy-support-for-ie6 or $legacy-support-for-ie7) and $legacy-support-for-mozilla and $direct != 'micro' and $direct != 'modern') or ($direct == 'legacy') {
38
- @if $extend {
39
- @extend %clearfix-legacy;
40
- }
41
- @else {
42
- /* for IE 6/7 */
43
- *zoom: expression(this.runtimeStyle.zoom="1", this.appendChild(document.createElement("br")).style.cssText="clear:both;font:0/0 serif");
44
- /* non-JS fallback */
45
- *zoom: 1;
46
-
47
- &:before,
48
- &:after {
49
- content: ".";
50
- display: block;
51
- height: 0;
52
- overflow: hidden;
53
- }
54
-
55
- &:after {
56
- clear: both;
57
- }
58
- }
4
+ @mixin clearfix($extend: null) {
5
+ $extend: if($extend !== null, $extend, toolkit-get('clearfix extend'));
6
+ @if $extend {
7
+ @extend %toolkit-clearfix;
59
8
  }
60
9
  @else {
61
- @if $extend {
62
- @extend %clearfix
63
- }
64
- @else {
65
- &:after {
66
- content: "";
67
- display: table;
68
- clear: both;
69
- }
10
+ &:after {
11
+ content: "";
12
+ display: table;
13
+ clear: both;
70
14
  }
71
15
  }
72
16
  }
73
17
 
74
- //////////////////////////////
75
- // Legacy Clearfix
76
- //
77
- // For when you need full Legacy support, including old IE and old Firefox
78
- //
79
- // From http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
80
- //////////////////////////////
81
- %clearfix-legacy {
82
- @include clearfix(false, 'legacy');
83
- }
84
-
85
- //////////////////////////////
86
- // Micro Clearfix
87
- //
88
- // For when you need old IE support, but not concerned with old Firefox
89
- // From http://nicolasgallagher.com/better-float-containment-in-ie/
90
- //////////////////////////////
91
- %clearfix-micro {
92
- @include clearfix(false, 'micro');
93
- }
94
-
95
- //////////////////////////////
96
- // Modern Clearfix
97
- //
98
- // Clearfix for modern browsers, especiall when using border-box
99
- //
100
- // From http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
101
- //////////////////////////////
102
- %clearfix {
103
- @include clearfix(false, 'modern');
18
+ %toolkit-clearfix {
19
+ @include clearfix(true);
104
20
  }
@@ -1 +1,89 @@
1
- @import "colours";
1
+ //////////////////////////////
2
+ // Compass Extension Imports
3
+ //////////////////////////////
4
+
5
+ //////////////////////////////
6
+ // Tint and Shade
7
+ //////////////////////////////
8
+ @function tint($colour, $amount) {
9
+ @return mix(toolkit-get('tint color'), $colour, $amount);
10
+ }
11
+
12
+ @function shade($colour, $amount) {
13
+ @return mix(toolkit-get('shade color'), $colour, $amount);
14
+ }
15
+
16
+ //////////////////////////////
17
+ // Color Stacks
18
+ //////////////////////////////
19
+ @function color-stack($main, $secondary, $amounts...) {
20
+ @if length($amounts) == 0 {
21
+ $amounts: toolkit-get('color stack amounts');
22
+ }
23
+ @else if length($amounts) == 1 {
24
+ $amounts: nth($amounts, 1);
25
+ }
26
+
27
+ $stack: $main;
28
+
29
+ @each $amount in $amounts {
30
+ $stack: join($stack, mix($secondary, nth($stack, 1), $amount));
31
+ }
32
+
33
+ @return $stack;
34
+ }
35
+
36
+ // Tint Stack
37
+ @function tint-stack($color, $amounts...) {
38
+ @if length($amounts) > 0 {
39
+ @return colour-stack($color, toolkit-get('tint color'), $amounts);
40
+ }
41
+ @else {
42
+ @return colour-stack($color, toolkit-get('tint color'));
43
+ }
44
+ }
45
+
46
+ // Shade Stack
47
+ @function shade-stack($color, $amounts...) {
48
+ @if length($amounts) > 0 {
49
+ @return colour-stack($color, toolkit-get('shade color'), $amounts);
50
+ }
51
+ @else {
52
+ @return colour-stack($color, toolkit-get('shade color'));
53
+ }
54
+ }
55
+
56
+ //////////////////////////////
57
+ // Color Scales
58
+ //////////////////////////////
59
+ @function color-scale($main, $secondary, $shades: null) {
60
+ $shades: if($shades !== null, $shades, toolkit-get('color scale shades'));
61
+
62
+ $list: $main;
63
+
64
+ $red1: red($main);
65
+ $red2: red($secondary);
66
+ $red-diff: (($red1 - $red2) / (($shades - 1)));
67
+
68
+ $grn1: green($main);
69
+ $grn2: green($secondary);
70
+ $grn-diff: (($grn1 - $grn2) / (($shades - 1)));
71
+
72
+ $blu1: blue($main);
73
+ $blu2: blue($secondary);
74
+ $blu-diff: (($blu1 - $blu2) / (($shades - 1)));
75
+
76
+ $red-hold: $red1;
77
+ $grn-hold: $grn1;
78
+ $blu-hold: $blu1;
79
+
80
+ @for $i from 2 through $shades {
81
+ $red-hold: $red-hold - ($red-diff);
82
+ $grn-hold: $grn-hold - ($grn-diff);
83
+ $blu-hold: $blu-hold - ($blu-diff);
84
+ $color-hold: rgb($red-hold, $grn-hold, $blu-hold);
85
+ $list: append($list, $color-hold);
86
+ }
87
+
88
+ @return $list;
89
+ }
@@ -4,13 +4,21 @@
4
4
  // Mixin as described by Filament Group
5
5
  // http://filamentgroup.com/lab/element_query_workarounds/
6
6
  //////////////////////////////
7
- @import "breakpoint";
8
7
 
9
8
  @mixin element-query($sizes...) {
10
- @each $size in $sizes {
11
- @include breakpoint(nth($size, 2)) {
12
- #{nth($size, 1)} & {
13
- @content;
9
+ @each $selector, $query in $sizes {
10
+ @if mixin-exists(breakpoint) {
11
+ @include breakpoint($query) {
12
+ #{$selector} & {
13
+ @content;
14
+ }
15
+ }
16
+ }
17
+ @else {
18
+ @media #{$query} {
19
+ #{$selector} & {
20
+ @content;
21
+ }
14
22
  }
15
23
  }
16
24
  }
@@ -1,23 +1,41 @@
1
1
  //////////////////////////////
2
2
  // Enable ligatures
3
3
  //////////////////////////////
4
- @mixin enable-ligatures {
5
- -webkit-font-feature-settings:"liga","dlig";
6
- -moz-font-feature-settings:"liga=1, dlig=1";
7
- -moz-font-feature-settings:"liga","dlig";
8
- -ms-font-feature-settings:"liga","dlig";
9
- -o-font-feature-settings:"liga","dlig";
10
- font-feature-settings: "liga","dlig";
4
+ @mixin enable-ligatures($extend: null) {
5
+ $extend: if($extend !== null, $extend, toolkit-get('extend ligatures'));
6
+
7
+ @if $extend {
8
+ @extend %enable-ligatures;
9
+ }
10
+ @else {
11
+ -webkit-font-feature-settings:"liga","dlig";
12
+ -moz-font-feature-settings:"liga=1, dlig=1";
13
+ -moz-font-feature-settings:"liga","dlig";
14
+ -ms-font-feature-settings:"liga","dlig";
15
+ -o-font-feature-settings:"liga","dlig";
16
+ font-feature-settings: "liga","dlig";
17
+ }
11
18
  }
12
19
 
13
20
  %enable-ligatures {
14
21
  @include enable-ligatures;
15
22
  }
16
23
 
24
+ @if not mixin-exists('single-transition') {
25
+ @mixin single-transition($feature, $duration) {
26
+ -webkit-transition: $feature $duration;
27
+ transition: $feature, $duration;
28
+ }
29
+ }
30
+
17
31
  //////////////////////////////
18
32
  // Font Fade In
19
33
  //////////////////////////////
20
- @mixin content-fade-in($duration: 1s, $loading: '.wf-loading', $selector: false) {
34
+ @mixin content-fade-in($duration: null, $loading: null) {
35
+
36
+ $duration: if($duration !== null, $duration, toolkit-get('fade in duration'));
37
+ $loading: if($loading !== null, $loading, toolkit-get('fade in loading class'));
38
+ $selector: if('#{&}' != '', true, false);
21
39
 
22
40
  @if $selector != false {
23
41
  #{$selector} {
@@ -1,13 +1,10 @@
1
1
  ////////////////////////
2
2
  // Fluid Embeds and whatever WITH NO JAVASCIPT!
3
3
  ////////////////////////
4
- $intrinsic-ratio: 16/9 !default;
5
- $intrinsic-ratio-width: 100% !default;
6
- $intrinsic-ratio-elements: '> *' !default;
7
- $intrinsic-ratio-extend: true !default;
8
- $intrinsic-ratio-direction: top !default;
4
+ @mixin intrinsic-ratio-parent($extend: null) {
5
+ $extend: if($extend !== null, $extend, toolkit-get('intrinsic ratio extend'));
6
+
9
7
 
10
- @mixin intrinsic-ratio-parent($extend: $intrinsic-ratio-extend) {
11
8
  @if $extend {
12
9
  @extend %intrinsic-ratio-parent;
13
10
  }
@@ -17,7 +14,8 @@ $intrinsic-ratio-direction: top !default;
17
14
  }
18
15
  }
19
16
 
20
- @mixin intrinsic-ratio-child($extend: $intrinsic-ratio-extend) {
17
+ @mixin intrinsic-ratio-child($extend: null) {
18
+ $extend: if($extend !== null, $extend, toolkit-get('intrinsic ratio extend'));
21
19
  @if $extend {
22
20
  @extend %intrinsic-ratio-child;
23
21
  }
@@ -32,12 +30,19 @@ $intrinsic-ratio-direction: top !default;
32
30
  }
33
31
  }
34
32
 
35
- @mixin intrinsic-ratio-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $direction: $intrinsic-ratio-direction) {
33
+ @mixin intrinsic-ratio-ratio($ratio: null, $width: null, $direction: null) {
34
+ $ratio: if($ration !== null, $ratio, toolkit-get('intrinsic ratio'));
35
+ $width: if($width !== null, $width, toolkit-get('intrinsic ratio width'));
36
+ $direction: if($direction !== null, $direction, toolkit-get('intrinsic ratio direction'));
36
37
  padding-#{$direction}: (1 / $ratio) * $width;
37
38
  width: $width;
38
39
  }
39
40
 
40
- @mixin intrinsic-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend, $direction: $intrinsic-ratio-direction) {
41
+ @mixin intrinsic-ratio($ratio: null, $width: null, $elements: null, $direction: null, $extend: null) {
42
+ $ratio: if($ration !== null, $ratio, toolkit-get('intrinsic ratio'));
43
+ $width: if($width !== null, $width, toolkit-get('intrinsic ratio width'));
44
+ $direction: if($direction !== null, $direction, toolkit-get('intrinsic ratio direction'));
45
+ $extend: if($extend !== null, $extend, toolkit-get('intrinsic ratio extend'));
41
46
  @include intrinsic-ratio-parent($extend);
42
47
 
43
48
  @include intrinsic-ratio-ratio($ratio, $width, $direction);
@@ -49,7 +54,7 @@ $intrinsic-ratio-direction: top !default;
49
54
  }
50
55
  }
51
56
 
52
- @mixin ir($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend, $direction: $intrinsic-ratio-direction) {
57
+ @mixin ir($ratio: null, $width: null, $elements: null, $direction: null, $extend: null) {
53
58
  @include intrinsic-ratio($ratio, $width, $elements, $extend, $direction);
54
59
  }
55
60