Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil LaPier committed Mar 16, 2012
2 parents 17ea029 + 0ec0115 commit 77b3645
Show file tree
Hide file tree
Showing 15 changed files with 252 additions and 146 deletions.
47 changes: 47 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,47 @@
PATH
remote: .
specs:
bourbon (1.4.0)
sass (>= 3.1)

GEM
remote: http://rubygems.org/
specs:
aruba (0.4.11)
childprocess (>= 0.2.3)
cucumber (>= 1.1.1)
ffi (>= 1.0.11)
rspec (>= 2.7.0)
builder (3.0.0)
childprocess (0.3.1)
ffi (~> 1.0.6)
cucumber (1.1.9)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.9.0)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
diff-lcs (1.1.3)
ffi (1.0.11)
gherkin (2.9.0)
json (>= 1.4.6)
json (1.6.5)
rake (0.9.2.2)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
sass (3.1.15)
term-ansicolor (1.0.7)

PLATFORMS
ruby

DEPENDENCIES
aruba (~> 0.4)
bourbon!
rake
2 changes: 1 addition & 1 deletion app/assets/stylesheets/_bourbon.scss
Expand Up @@ -30,6 +30,6 @@
@import "addons/button";
@import "addons/clearfix";
@import "addons/font-family";
@import "addons/hide-text";
@import "addons/html5-input-types";
@import "addons/position";
@import "addons/timing-functions";
6 changes: 3 additions & 3 deletions app/assets/stylesheets/addons/_button.scss
Expand Up @@ -66,7 +66,7 @@
font-size: 11px;
font-weight: bold;
@include linear-gradient ($base-color, $stop-gradient);
padding: 6px 18px 7px;
padding: 7px 18px;
text-decoration: none;
text-shadow: 0 1px 0 $text-shadow;
-webkit-background-clip: padding-box;
Expand Down Expand Up @@ -138,7 +138,7 @@
font-size: 14px;
font-weight: bold;
@include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
padding: 7px 20px 8px;
padding: 8px 20px;
text-align: center;
text-decoration: none;
text-shadow: 0 -1px 1px $text-shadow;
Expand Down Expand Up @@ -210,7 +210,7 @@
font-weight: normal;
line-height: 1;
@include linear-gradient ($base-color, $stop-gradient);
padding: 3px 16px 5px;
padding: 5px 16px;
text-align: center;
text-decoration: none;
text-shadow: 0 -1px 1px $text-shadow;
Expand Down
15 changes: 15 additions & 0 deletions app/assets/stylesheets/addons/_hide-text.scss
@@ -0,0 +1,15 @@
@mixin hide-text {
background-color: transparent;
border: 0;
color: transparent;
font: 0/0 a;
text-shadow: none;
}

// A CSS image replacement method that does not require the use of text-indent.
//
// Examples
//
// .ir {
// @include hide-text;
// }
30 changes: 0 additions & 30 deletions app/assets/stylesheets/addons/_position.scss

This file was deleted.

28 changes: 0 additions & 28 deletions app/assets/stylesheets/css3/_animation.scss
Expand Up @@ -141,31 +141,3 @@
-moz-animation-fill-mode: $full;
animation-fill-mode: $full;
}


// Deprecated
@mixin animation-basic ($name, $time: 0, $motion: ease) {
$length-of-name: length($name);
$length-of-time: length($time);
$length-of-motion: length($motion);

@if $length-of-name > 1 {
@include animation-name(zip($name));
} @else {
@include animation-name( $name);
}

@if $length-of-time > 1 {
@include animation-duration(zip($time));
} @else {
@include animation-duration( $time);
}

@if $length-of-motion > 1 {
@include animation-timing-function(zip($motion));
} @else {
@include animation-timing-function( $motion);
}
@warn "The animation-basic mixin is deprecated. Use the animation mixin instead.";
}

4 changes: 3 additions & 1 deletion app/assets/stylesheets/css3/_linear-gradient.scss
Expand Up @@ -3,6 +3,8 @@
$G5: false, $G6: false,
$G7: false, $G8: false,
$G9: false, $G10: false,
$deprecated-pos1: left top,
$deprecated-pos2: left bottom,
$fallback: false) {
// Detect what type of value exists in $pos
$pos-type: type-of(nth($pos, 1));
Expand All @@ -25,7 +27,7 @@
}

background-color: $fallback-color;
background-image: deprecated-webkit-gradient(linear, $full); // Safari <= 5.0
background-image: deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0
background-image: -webkit-linear-gradient($pos, $full); // Safari 5.1+, Chrome
background-image: -moz-linear-gradient($pos, $full);
background-image: -ms-linear-gradient($pos, $full);
Expand Down
55 changes: 50 additions & 5 deletions app/assets/stylesheets/css3/_radial-gradient.scss
@@ -1,24 +1,69 @@
// Requires Sass 3.1+
@mixin radial-gradient($pos, $shape-size,
$G1, $G2,
@mixin radial-gradient($G1, $G2,
$G3: false, $G4: false,
$G5: false, $G6: false,
$G7: false, $G8: false,
$G9: false, $G10: false,
$pos: 50% 50%,
$shape-size: ellipse cover,
$deprecated-pos1: center center,
$deprecated-pos2: center center,
$deprecated-radius1: 0,
$deprecated-radius2: 460,
$fallback: false) {

@each $value in $G1, $G2 {
$first-val: nth($value, 1);
$pos-type: type-of($first-val);

@if ($pos-type != color) or ($first-val != "transparent") {
@if ($pos-type == number)
or ($first-val == "center")
or ($first-val == "top")
or ($first-val == "right")
or ($first-val == "bottom")
or ($first-val == "left") {

$pos: $value;

@if $pos == $G1 {
$G1: false;
}
}

@else if
($first-val == "ellipse")
or ($first-val == "circle")
or ($first-val == "closest-side")
or ($first-val == "closest-corner")
or ($first-val == "farthest-side")
or ($first-val == "farthest-corner")
or ($first-val == "contain")
or ($first-val == "cover") {

$shape-size: $value;

@if $value == $G1 {
$G1: false;
}

@else if $value == $G2 {
$G2: false;
}
}
}
}

$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);

// Set $G1 as the default fallback color
$fallback-color: nth($G1, 1);

// If $fallback is a color use that color as the fallback color
@if (type-of($fallback) == color) or ($fallback == "transparent") {
$fallback-color: $fallback;
}

background-color: $fallback-color;
background-image: deprecated-webkit-gradient(radial, $full); // Safari <= 5.0
background-image: deprecated-webkit-gradient(radial, $deprecated-pos1, $deprecated-pos2, $full, $deprecated-radius1, $deprecated-radius2); // Safari <= 5.0
background-image: -webkit-radial-gradient($pos, $shape-size, $full);
background-image: -moz-radial-gradient($pos, $shape-size, $full);
background-image: -ms-radial-gradient($pos, $shape-size, $full);
Expand Down
44 changes: 14 additions & 30 deletions app/assets/stylesheets/css3/_transition.scss
Expand Up @@ -3,40 +3,24 @@
// @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
// @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));

@mixin transition ($property: all, $duration: 0.15s, $timing-function: ease-out, $delay: 0) {

// Detect # of args passed into each variable
$length-of-property: length($property);
$length-of-duration: length($duration);
$length-of-timing-function: length($timing-function);
$length-of-delay: length($delay);

@if $length-of-property > 1 {
@include transition-property(zip($property)); }
@else {
@include transition-property( $property);
}

@if $length-of-duration > 1 {
@include transition-duration(zip($duration)); }
@else {
@include transition-duration( $duration);
}

@if $length-of-timing-function > 1 {
@include transition-timing-function(zip($timing-function)); }
@else {
@include transition-timing-function( $timing-function);
}
@mixin transition ($prop-1: all 0.15s ease-out 0,
$prop-2: false, $prop-3: false,
$prop-4: false, $prop-5: false,
$prop-6: false, $prop-7: false,
$prop-8: false, $prop-9: false)
{
$full: compact($prop-1, $prop-2, $prop-3, $prop-4, $prop-5,
$prop-6, $prop-7, $prop-8, $prop-9);

@if $length-of-delay > 1 {
@include transition-delay(zip($delay)); }
@else {
@include transition-delay( $delay);
}
-webkit-transition: $full;
-moz-transition: $full;
-ms-transition: $full;
-o-transition: $full;
transition: $full;
}



@mixin transition-property ($prop-1: all,
$prop-2: false, $prop-3: false,
$prop-4: false, $prop-5: false,
Expand Down
14 changes: 11 additions & 3 deletions app/assets/stylesheets/functions/_deprecated-webkit-gradient.scss
@@ -1,6 +1,9 @@
// Render Deprecated Webkit Gradient - Linear || Radial
//************************************************************************//
@function deprecated-webkit-gradient($type, $full) {
@function deprecated-webkit-gradient($type,
$deprecated-pos1, $deprecated-pos2,
$full,
$deprecated-radius1: false, $deprecated-radius2: false) {
$gradient-list: ();
$gradient: false;
$full-length: length($full);
Expand All @@ -14,23 +17,28 @@
$color-stop: color-stop(nth($gradient, 2), nth($gradient, 1));
$gradient-list: join($gradient-list, $color-stop, comma);
}

@else {
@if $i == $full-length {
$percentage: 100%;
}

@else {
$percentage: ($i - 1) * (100 / ($full-length - 1)) + "%";
}

$color-stop: color-stop(unquote($percentage), $gradient);
$gradient-list: join($gradient-list, $color-stop, comma);
}
}

@if $type == radial {
$gradient: -webkit-gradient(radial, center center, 0, center center, 460, $gradient-list);
$gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list);
}

@else if $type == linear {
$gradient: -webkit-gradient(linear, left top, left bottom, $gradient-list);
$gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list);
}

@return $gradient;
}

0 comments on commit 77b3645

Please sign in to comment.