bourbon-compass 2.1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/lib/bourbon-compass.rb +4 -0
  2. data/readme.md +31 -0
  3. data/stylesheets/bourbon/_bourbon.scss +40 -0
  4. data/stylesheets/bourbon/addons/_button.scss +273 -0
  5. data/stylesheets/bourbon/addons/_clearfix.scss +29 -0
  6. data/stylesheets/bourbon/addons/_font-face.scss +12 -0
  7. data/stylesheets/bourbon/addons/_font-family.scss +5 -0
  8. data/stylesheets/bourbon/addons/_hide-text.scss +15 -0
  9. data/stylesheets/bourbon/addons/_html5-input-types.scss +36 -0
  10. data/stylesheets/bourbon/addons/_position.scss +42 -0
  11. data/stylesheets/bourbon/addons/_timing-functions.scss +32 -0
  12. data/stylesheets/bourbon/css3/_animation.scss +125 -0
  13. data/stylesheets/bourbon/css3/_appearance.scss +3 -0
  14. data/stylesheets/bourbon/css3/_background-image.scss +57 -0
  15. data/stylesheets/bourbon/css3/_background-size.scss +11 -0
  16. data/stylesheets/bourbon/css3/_background.scss +107 -0
  17. data/stylesheets/bourbon/css3/_border-image.scss +56 -0
  18. data/stylesheets/bourbon/css3/_border-radius.scss +44 -0
  19. data/stylesheets/bourbon/css3/_box-shadow.scss +12 -0
  20. data/stylesheets/bourbon/css3/_box-sizing.scss +4 -0
  21. data/stylesheets/bourbon/css3/_columns.scss +47 -0
  22. data/stylesheets/bourbon/css3/_flex-box.scss +52 -0
  23. data/stylesheets/bourbon/css3/_inline-block.scss +8 -0
  24. data/stylesheets/bourbon/css3/_linear-gradient.scss +43 -0
  25. data/stylesheets/bourbon/css3/_prefixer.scss +12 -0
  26. data/stylesheets/bourbon/css3/_radial-gradient.scss +76 -0
  27. data/stylesheets/bourbon/css3/_transform.scss +11 -0
  28. data/stylesheets/bourbon/css3/_transition.scss +72 -0
  29. data/stylesheets/bourbon/css3/_user-select.scss +3 -0
  30. data/stylesheets/bourbon/functions/_deprecated-webkit-gradient.scss +44 -0
  31. data/stylesheets/bourbon/functions/_flex-grid.scss +35 -0
  32. data/stylesheets/bourbon/functions/_grid-width.scss +13 -0
  33. data/stylesheets/bourbon/functions/_linear-gradient.scss +23 -0
  34. data/stylesheets/bourbon/functions/_modular-scale.scss +40 -0
  35. data/stylesheets/bourbon/functions/_radial-gradient.scss +62 -0
  36. data/stylesheets/bourbon/functions/_render-gradients.scss +14 -0
  37. data/stylesheets/bourbon/functions/_tint-shade.scss +9 -0
  38. data/stylesheets/bourbon/functions/_transition-property-name.scss +22 -0
  39. data/stylesheets/bourbon/lib/bourbon.rb +19 -0
  40. data/stylesheets/bourbon/lib/bourbon/sass_extensions.rb +6 -0
  41. data/stylesheets/bourbon/lib/bourbon/sass_extensions/functions.rb +13 -0
  42. data/stylesheets/bourbon/lib/bourbon/sass_extensions/functions/compact.rb +14 -0
  43. metadata +118 -0
@@ -0,0 +1,12 @@
1
+ // Box-Shadow Mixin Requires Sass v3.1.1+
2
+ @mixin box-shadow ($shadow-1,
3
+ $shadow-2: false, $shadow-3: false,
4
+ $shadow-4: false, $shadow-5: false,
5
+ $shadow-6: false, $shadow-7: false,
6
+ $shadow-8: false, $shadow-9: false)
7
+ {
8
+ $full: compact($shadow-1, $shadow-2, $shadow-3, $shadow-4,
9
+ $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9);
10
+
11
+ @include prefixer(box-shadow, $full, webkit, not moz);
12
+ }
@@ -0,0 +1,4 @@
1
+ @mixin box-sizing ($box) {
2
+ // content-box | border-box | inherit
3
+ @include prefixer(box-sizing, $box);
4
+ }
@@ -0,0 +1,47 @@
1
+ @mixin columns($arg: auto) {
2
+ // <column-count> || <column-width>
3
+ @include prefixer(columns, $arg);
4
+ }
5
+
6
+ @mixin column-count($int: auto) {
7
+ // auto || integer
8
+ @include prefixer(column-count, $int);
9
+ }
10
+
11
+ @mixin column-gap($length: normal) {
12
+ // normal || length
13
+ @include prefixer(column-gap, $length);
14
+ }
15
+
16
+ @mixin column-fill($arg: auto) {
17
+ // auto || length
18
+ @include prefixer(columns-fill, $arg);
19
+ }
20
+
21
+ @mixin column-rule($arg) {
22
+ // <border-width> || <border-style> || <color>
23
+ @include prefixer(column-rule, $arg);
24
+ }
25
+
26
+ @mixin column-rule-color($color) {
27
+ @include prefixer(column-rule-color, $color);
28
+ }
29
+
30
+ @mixin column-rule-style($style: none) {
31
+ // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid
32
+ @include prefixer(column-rule-style, $style);
33
+ }
34
+
35
+ @mixin column-rule-width ($width: none) {
36
+ @include prefixer(column-rule-width, $width);
37
+ }
38
+
39
+ @mixin column-span($arg: none) {
40
+ // none || all
41
+ @include prefixer(column-span, $arg);
42
+ }
43
+
44
+ @mixin column-width($length: auto) {
45
+ // auto || length
46
+ @include prefixer(column-width, $length);
47
+ }
@@ -0,0 +1,52 @@
1
+ // CSS3 Flexible Box Model and property defaults
2
+
3
+ // Custom shorthand notation for flexbox
4
+ @mixin box($orient: inline-axis, $pack: start, $align: stretch) {
5
+ @include display-box;
6
+ @include box-orient($orient);
7
+ @include box-pack($pack);
8
+ @include box-align($align);
9
+ }
10
+
11
+ @mixin display-box {
12
+ display: -webkit-box;
13
+ display: -moz-box;
14
+ display: box;
15
+ }
16
+
17
+ @mixin box-orient($orient: inline-axis) {
18
+ // horizontal|vertical|inline-axis|block-axis|inherit
19
+ @include prefixer(box-orient, $orient);
20
+ }
21
+
22
+ @mixin box-pack($pack: start) {
23
+ // start|end|center|justify
24
+ @include prefixer(box-pack, $pack);
25
+ }
26
+
27
+ @mixin box-align($align: stretch) {
28
+ // start|end|center|baseline|stretch
29
+ @include prefixer(box-align, $align);
30
+ }
31
+
32
+ @mixin box-direction($direction: normal) {
33
+ // normal|reverse|inherit
34
+ @include prefixer(box-direction, $direction);
35
+ }
36
+
37
+ @mixin box-lines($lines: single) {
38
+ // single|multiple
39
+ @include prefixer(box-lines, $lines);
40
+ }
41
+
42
+ @mixin box-ordinal-group($int: 1) {
43
+ @include prefixer(box-ordinal-group, $int);
44
+ }
45
+
46
+ @mixin box-flex($value: 0.0) {
47
+ @include prefixer(box-flex, $value);
48
+ }
49
+
50
+ @mixin box-flex-group($int: 1) {
51
+ @include prefixer(box-flex-group, $int);
52
+ }
@@ -0,0 +1,8 @@
1
+ // Legacy support for inline-block in IE7 (maybe IE6)
2
+ @mixin inline-block {
3
+ display: inline-block;
4
+ vertical-align: baseline;
5
+ zoom: 1;
6
+ *display: inline;
7
+ *vertical-align: auto;
8
+ }
@@ -0,0 +1,43 @@
1
+ @mixin linear-gradient($pos, $G1, $G2: false,
2
+ $G3: false, $G4: false,
3
+ $G5: false, $G6: false,
4
+ $G7: false, $G8: false,
5
+ $G9: false, $G10: false,
6
+ $deprecated-pos1: left top,
7
+ $deprecated-pos2: left bottom,
8
+ $fallback: false) {
9
+ // Detect what type of value exists in $pos
10
+ $pos-type: type-of(nth($pos, 1));
11
+
12
+ // If $pos is missing from mixin, reassign vars and add default position
13
+ @if ($pos-type == color) or (nth($pos, 1) == "transparent") {
14
+ $G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5;
15
+ $G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos;
16
+ $pos: top; // Default position
17
+ }
18
+
19
+ $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
20
+
21
+ // Set $G1 as the default fallback color
22
+ $fallback-color: nth($G1, 1);
23
+
24
+ // If $fallback is a color use that color as the fallback color
25
+ @if (type-of($fallback) == color) or ($fallback == "transparent") {
26
+ $fallback-color: $fallback;
27
+ }
28
+
29
+ background-color: $fallback-color;
30
+ background-image: deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0
31
+ background-image: -webkit-linear-gradient($pos, $full); // Safari 5.1+, Chrome
32
+ background-image: -moz-linear-gradient($pos, $full);
33
+ background-image: -ms-linear-gradient($pos, $full);
34
+ background-image: -o-linear-gradient($pos, $full);
35
+ background-image: unquote("linear-gradient(#{$pos}, #{$full})");
36
+ }
37
+
38
+
39
+ // Usage: Gradient position is optional, default is top. Position can be a degree. Color stops are optional as well.
40
+ // @include linear-gradient(#1e5799, #2989d8);
41
+ // @include linear-gradient(#1e5799, #2989d8, $fallback:#2989d8);
42
+ // @include linear-gradient(top, #1e5799 0%, #2989d8 50%);
43
+ // @include linear-gradient(50deg, rgba(10, 10, 10, 0.5) 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
@@ -0,0 +1,12 @@
1
+ @mixin prefixer ($property, $value,
2
+ $webkit: true,
3
+ $moz: true,
4
+ $ms: false,
5
+ $o: false,
6
+ $spec: true) {
7
+ @if $webkit { -webkit-#{$property}: $value; }
8
+ @if $moz { -moz-#{$property}: $value; }
9
+ @if $ms { -ms-#{$property}: $value; }
10
+ @if $o { -o-#{$property}: $value; }
11
+ @if $spec { #{$property}: $value; }
12
+ }
@@ -0,0 +1,76 @@
1
+ // Requires Sass 3.1+
2
+ @mixin radial-gradient($G1, $G2,
3
+ $G3: false, $G4: false,
4
+ $G5: false, $G6: false,
5
+ $G7: false, $G8: false,
6
+ $G9: false, $G10: false,
7
+ $pos: 50% 50%,
8
+ $shape-size: ellipse cover,
9
+ $deprecated-pos1: center center,
10
+ $deprecated-pos2: center center,
11
+ $deprecated-radius1: 0,
12
+ $deprecated-radius2: 460,
13
+ $fallback: false) {
14
+
15
+ @each $value in $G1, $G2 {
16
+ $first-val: nth($value, 1);
17
+ $pos-type: type-of($first-val);
18
+
19
+ @if ($pos-type != color) or ($first-val != "transparent") {
20
+ @if ($pos-type == number)
21
+ or ($first-val == "center")
22
+ or ($first-val == "top")
23
+ or ($first-val == "right")
24
+ or ($first-val == "bottom")
25
+ or ($first-val == "left") {
26
+
27
+ $pos: $value;
28
+
29
+ @if $pos == $G1 {
30
+ $G1: false;
31
+ }
32
+ }
33
+
34
+ @else if
35
+ ($first-val == "ellipse")
36
+ or ($first-val == "circle")
37
+ or ($first-val == "closest-side")
38
+ or ($first-val == "closest-corner")
39
+ or ($first-val == "farthest-side")
40
+ or ($first-val == "farthest-corner")
41
+ or ($first-val == "contain")
42
+ or ($first-val == "cover") {
43
+
44
+ $shape-size: $value;
45
+
46
+ @if $value == $G1 {
47
+ $G1: false;
48
+ }
49
+
50
+ @else if $value == $G2 {
51
+ $G2: false;
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ $full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
58
+
59
+ $fallback-color: nth($G1, 1);
60
+
61
+ @if (type-of($fallback) == color) or ($fallback == "transparent") {
62
+ $fallback-color: $fallback;
63
+ }
64
+
65
+ background-color: $fallback-color;
66
+ background-image: deprecated-webkit-gradient(radial, $deprecated-pos1, $deprecated-pos2, $full, $deprecated-radius1, $deprecated-radius2); // Safari <= 5.0
67
+ background-image: -webkit-radial-gradient($pos, $shape-size, $full);
68
+ background-image: -moz-radial-gradient($pos, $shape-size, $full);
69
+ background-image: -ms-radial-gradient($pos, $shape-size, $full);
70
+ background-image: -o-radial-gradient($pos, $shape-size, $full);
71
+ background-image: unquote("radial-gradient(#{$pos}, #{$shape-size}, #{$full})");
72
+ }
73
+
74
+ // Usage: Gradient position and shape-size are required. Color stops are optional.
75
+ // @include radial-gradient(50% 50%, circle cover, #1e5799, #efefef);
76
+ // @include radial-gradient(50% 50%, circle cover, #eee 10%, #1e5799 30%, #efefef);
@@ -0,0 +1,11 @@
1
+ @mixin transform($property: none) {
2
+ // none | <transform-function>
3
+ @include prefixer(transform, $property, webkit, moz, ms, o);
4
+ }
5
+
6
+ @mixin transform-origin($axes: 50%) {
7
+ // x-axis - left | center | right | length | %
8
+ // y-axis - top | center | bottom | length | %
9
+ // z-axis - length
10
+ @include prefixer(transform-origin, $axes, webkit, moz, ms, o);
11
+ }
@@ -0,0 +1,72 @@
1
+ // Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.
2
+ // Example: @include transition (all, 2.0s, ease-in-out);
3
+ // @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
4
+ // @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));
5
+
6
+ @mixin transition ($prop-1: all 0.15s ease-out 0,
7
+ $prop-2: false, $prop-3: false,
8
+ $prop-4: false, $prop-5: false,
9
+ $prop-6: false, $prop-7: false,
10
+ $prop-8: false, $prop-9: false)
11
+ {
12
+ $full: compact($prop-1, $prop-2, $prop-3, $prop-4, $prop-5,
13
+ $prop-6, $prop-7, $prop-8, $prop-9);
14
+
15
+ @include prefixer(transition, $full, webkit, moz, ms, o);
16
+ }
17
+
18
+
19
+
20
+ @mixin transition-property ($prop-1: all,
21
+ $prop-2: false, $prop-3: false,
22
+ $prop-4: false, $prop-5: false,
23
+ $prop-6: false, $prop-7: false,
24
+ $prop-8: false, $prop-9: false)
25
+ {
26
+ $full: compact($prop-1, $prop-2, $prop-3, $prop-4, $prop-5,
27
+ $prop-6, $prop-7, $prop-8, $prop-9);
28
+
29
+ -webkit-transition-property: transition-property-names($full, 'webkit');
30
+ -moz-transition-property: transition-property-names($full, 'moz');
31
+ -ms-transition-property: transition-property-names($full, 'ms');
32
+ -o-transition-property: transition-property-names($full, 'o');
33
+ transition-property: transition-property-names($full, false);
34
+ }
35
+
36
+ @mixin transition-duration ($time-1: 0,
37
+ $time-2: false, $time-3: false,
38
+ $time-4: false, $time-5: false,
39
+ $time-6: false, $time-7: false,
40
+ $time-8: false, $time-9: false)
41
+ {
42
+ $full: compact($time-1, $time-2, $time-3, $time-4, $time-5,
43
+ $time-6, $time-7, $time-8, $time-9);
44
+
45
+ @include prefixer(transition-duration, $full, webkit, moz, ms, o);
46
+ }
47
+
48
+ @mixin transition-timing-function ($motion-1: ease,
49
+ $motion-2: false, $motion-3: false,
50
+ $motion-4: false, $motion-5: false,
51
+ $motion-6: false, $motion-7: false,
52
+ $motion-8: false, $motion-9: false)
53
+ {
54
+ $full: compact($motion-1, $motion-2, $motion-3, $motion-4, $motion-5,
55
+ $motion-6, $motion-7, $motion-8, $motion-9);
56
+
57
+ // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier()
58
+ @include prefixer(transition-timing-function, $full, webkit, moz, ms, o);
59
+ }
60
+
61
+ @mixin transition-delay ($time-1: 0,
62
+ $time-2: false, $time-3: false,
63
+ $time-4: false, $time-5: false,
64
+ $time-6: false, $time-7: false,
65
+ $time-8: false, $time-9: false)
66
+ {
67
+ $full: compact($time-1, $time-2, $time-3, $time-4, $time-5,
68
+ $time-6, $time-7, $time-8, $time-9);
69
+
70
+ @include prefixer(transition-delay, $full, webkit, moz, ms, o);
71
+ }
72
+
@@ -0,0 +1,3 @@
1
+ @mixin user-select($arg: none) {
2
+ @include prefixer(user-select, $arg, webkit, moz, ms);
3
+ }
@@ -0,0 +1,44 @@
1
+ // Render Deprecated Webkit Gradient - Linear || Radial
2
+ //************************************************************************//
3
+ @function deprecated-webkit-gradient($type,
4
+ $deprecated-pos1, $deprecated-pos2,
5
+ $full,
6
+ $deprecated-radius1: false, $deprecated-radius2: false) {
7
+ $gradient-list: ();
8
+ $gradient: false;
9
+ $full-length: length($full);
10
+ $percentage: false;
11
+ $gradient-type: $type;
12
+
13
+ @for $i from 1 through $full-length {
14
+ $gradient: nth($full, $i);
15
+
16
+ @if length($gradient) == 2 {
17
+ $color-stop: color-stop(nth($gradient, 2), nth($gradient, 1));
18
+ $gradient-list: join($gradient-list, $color-stop, comma);
19
+ }
20
+
21
+ @else {
22
+ @if $i == $full-length {
23
+ $percentage: 100%;
24
+ }
25
+
26
+ @else {
27
+ $percentage: ($i - 1) * (100 / ($full-length - 1)) + "%";
28
+ }
29
+
30
+ $color-stop: color-stop(unquote($percentage), $gradient);
31
+ $gradient-list: join($gradient-list, $color-stop, comma);
32
+ }
33
+ }
34
+
35
+ @if $type == radial {
36
+ $gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list);
37
+ }
38
+
39
+ @else if $type == linear {
40
+ $gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list);
41
+ }
42
+
43
+ @return $gradient;
44
+ }
@@ -0,0 +1,35 @@
1
+ // Flexible grid
2
+ @function flex-grid($columns, $container-columns: $fg-max-columns) {
3
+ $width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
4
+ $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
5
+ @return percentage($width / $container-width);
6
+ }
7
+
8
+ // Flexible gutter
9
+ @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
10
+ $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
11
+ @return percentage($gutter / $container-width);
12
+ }
13
+
14
+ // The $fg-column, $fg-gutter and $fg-max-columns variables must be defined in your base stylesheet to properly use the flex-grid function.
15
+ // This function takes the fluid grid equation (target / context = result) and uses columns to help define each.
16
+ //
17
+ // $fg-column: 60px; // Column Width
18
+ // $fg-gutter: 25px; // Gutter Width
19
+ // $fg-max-columns: 12; // Total Columns For Main Container
20
+ //
21
+ // div {
22
+ // width: flex-grid(4); // returns (315px / 1020px) = 30.882353%;
23
+ // margin-left: flex-gutter(); // returns (25px / 1020px) = 2.45098%;
24
+ //
25
+ // p {
26
+ // width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%;
27
+ // float: left;
28
+ // margin: flex-gutter(4); // returns (25px / 315px) = 7.936508%;
29
+ // }
30
+ //
31
+ // blockquote {
32
+ // float: left;
33
+ // width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%;
34
+ // }
35
+ // }
@@ -0,0 +1,13 @@
1
+ @function grid-width($n) {
2
+ @return $n * $gw-column + ($n - 1) * $gw-gutter;
3
+ }
4
+
5
+ // The $gw-column and $gw-gutter variables must be defined in your base stylesheet to properly use the grid-width function.
6
+ //
7
+ // $gw-column: 100px; // Column Width
8
+ // $gw-gutter: 40px; // Gutter Width
9
+ //
10
+ // div {
11
+ // width: grid-width(4); // returns 520px;
12
+ // margin-left: $gw-gutter; // returns 40px;
13
+ // }