toolkit 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -36,4 +36,9 @@
|
|
36
36
|
//////////////////////////////
|
37
37
|
// Import Selector Awesomeness
|
38
38
|
//////////////////////////////
|
39
|
-
@import "toolkit/selectors";
|
39
|
+
@import "toolkit/selectors";
|
40
|
+
|
41
|
+
//////////////////////////////
|
42
|
+
// Import Equal Height Columns
|
43
|
+
//////////////////////////////
|
44
|
+
@import "toolkit/equal-height-columns";
|
data/stylesheets/_toolkit.scss
CHANGED
@@ -46,4 +46,9 @@
|
|
46
46
|
//////////////////////////////
|
47
47
|
// Import Selector Awesomeness
|
48
48
|
//////////////////////////////
|
49
|
-
@import "toolkit/selectors";
|
49
|
+
@import "toolkit/selectors";
|
50
|
+
|
51
|
+
//////////////////////////////
|
52
|
+
// Import Equal Height Columns
|
53
|
+
//////////////////////////////
|
54
|
+
@import "toolkit/equal-height-columns";
|
@@ -0,0 +1,60 @@
|
|
1
|
+
@import "compass/css3/images";
|
2
|
+
|
3
|
+
$equal-height-columns-direction: left !default;
|
4
|
+
|
5
|
+
//////////////////////////////
|
6
|
+
// Equal Height Columns
|
7
|
+
//
|
8
|
+
// Builds equal-height columns based on Dan Cederholm's Faux Columns method using CSS3 Gradients
|
9
|
+
// Can be used to build fluid or fixed backgrounds, depending on widths passed in.
|
10
|
+
// http://alistapart.com/article/fauxcolumns
|
11
|
+
//////////////////////////////
|
12
|
+
@mixin equal-height-columns($widths, $colors, $direction: $equal-height-columns-direction) {
|
13
|
+
@if (length($widths) != length($colors)) and (length($widths) != length($colors) - 1) {
|
14
|
+
@warn 'You either need an equal number of widths and colors or one less width than color, in which case it is assumed that the last width goes to 100%. Please provide the correct amount of widths and colors.';
|
15
|
+
}
|
16
|
+
@else {
|
17
|
+
$stops: ();
|
18
|
+
|
19
|
+
@if length($widths) == (length($colors) - 1) {
|
20
|
+
$widths: append($widths, 100%);
|
21
|
+
}
|
22
|
+
|
23
|
+
$i: 1;
|
24
|
+
|
25
|
+
@each $width in $widths {
|
26
|
+
$width: nth($widths, $i);
|
27
|
+
$color: nth($colors, $i);
|
28
|
+
|
29
|
+
@if $i == 1 {
|
30
|
+
$stops: join($stops, build-gradient-piece($width, $color), comma);
|
31
|
+
}
|
32
|
+
@else {
|
33
|
+
$position: nth($widths, $i - 1);
|
34
|
+
$stops: join($stops, build-gradient-piece($width, $color, $position), comma);
|
35
|
+
}
|
36
|
+
|
37
|
+
$i: $i + 1;
|
38
|
+
}
|
39
|
+
|
40
|
+
@debug $stops;
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
@include background-image(
|
45
|
+
linear-gradient($direction, $stops)
|
46
|
+
);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
@function build-gradient-piece($width, $color, $position: false) {
|
51
|
+
@if ($position == 'last') {
|
52
|
+
@return ($color $width);
|
53
|
+
}
|
54
|
+
@else if ($position != false) {
|
55
|
+
@return $color $position, $color $width;
|
56
|
+
}
|
57
|
+
@else {
|
58
|
+
@return $color, $color $width;
|
59
|
+
}
|
60
|
+
}
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 5
|
9
|
+
version: 0.2.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sam Richard
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-02-
|
19
|
+
date: 2011-02-26 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- stylesheets/toolkit/_children-of-ie.scss
|
107
107
|
- stylesheets/toolkit/_clearfix.scss
|
108
108
|
- stylesheets/toolkit/_colours.scss
|
109
|
+
- stylesheets/toolkit/_equal-height-columns.scss
|
109
110
|
- stylesheets/toolkit/_fluid-media.scss
|
110
111
|
- stylesheets/toolkit/_intrinsic-ratio.scss
|
111
112
|
- stylesheets/toolkit/_pe.scss
|