Skip to content

Commit

Permalink
Bump to 3.2.0.beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jedfoster committed Nov 18, 2013
1 parent 386c79a commit aa075a5
Show file tree
Hide file tree
Showing 34 changed files with 663 additions and 185 deletions.
4 changes: 2 additions & 2 deletions bourbon-compass.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
# Release Specific Information
s.version = "3.1.8"
s.date = "2013-06-11"
s.version = "3.2.0.beta.1"
s.date = "2013-11-15"

# Gem Details
s.name = "bourbon-compass"
Expand Down
14 changes: 12 additions & 2 deletions stylesheets/bourbon/_bourbon.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Settings
@import "settings/prefixer";
@import "settings/px-to-em";

// Custom Helpers
@import "helpers/deprecated-webkit-gradient";
@import "helpers/gradient-positions-parser";
@import "helpers/linear-positions-parser";
@import "helpers/radial-arg-parser";
Expand All @@ -8,15 +11,17 @@
@import "helpers/shape-size-stripper";

// Custom Functions
@import "functions/compact";
@import "functions/flex-grid";
@import "functions/grid-width";
@import "functions/golden-ratio";
@import "functions/linear-gradient";
@import "functions/modular-scale";
@import "functions/px-to-em";
@import "functions/radial-gradient";
@import "functions/strip-units";
@import "functions/tint-shade";
@import "functions/transition-property-name";
@import "functions/unpack";

// CSS3 Mixins
@import "css3/animation";
Expand All @@ -27,9 +32,11 @@
@import "css3/border-image";
@import "css3/border-radius";
@import "css3/box-sizing";
@import "css3/calc";
@import "css3/columns";
@import "css3/flex-box";
@import "css3/font-face";
@import "css3/hyphens";
@import "css3/hidpi-media-query";
@import "css3/image-rendering";
@import "css3/inline-block";
Expand All @@ -45,11 +52,14 @@
// Addons & other mixins
@import "addons/button";
@import "addons/clearfix";
@import "addons/directional-values";
@import "addons/ellipsis";
@import "addons/font-family";
@import "addons/hide-text";
@import "addons/html5-input-types";
@import "addons/position";
@import "addons/prefixer";
@import "addons/rem";
@import "addons/retina-image";
@import "addons/size";
@import "addons/timing-functions";
Expand Down
6 changes: 3 additions & 3 deletions stylesheets/bourbon/addons/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
box-shadow: inset 0 1px 0 0 $inset-shadow;
color: $color;
display: inline-block;
font-size: 11px;
font-size: inherit;
font-weight: bold;
@include linear-gradient ($base-color, $stop-gradient);
padding: 7px 18px;
Expand Down Expand Up @@ -140,7 +140,7 @@
box-shadow: inset 0 1px 0 0 $inset-shadow;
color: $color;
display: inline-block;
font-size: 14px;
font-size: inherit;
font-weight: bold;
@include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
padding: 8px 20px;
Expand Down Expand Up @@ -211,7 +211,7 @@
box-shadow: inset 0 1px 0 0 $inset-shadow, 0 1px 2px 0 #b3b3b3;
color: $color;
display: inline-block;
font-size: 11px;
font-size: inherit;
font-weight: normal;
line-height: 1;
@include linear-gradient ($base-color, $stop-gradient);
Expand Down
16 changes: 5 additions & 11 deletions stylesheets/bourbon/addons/_clearfix.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Micro clearfix provides an easy way to contain floats without adding additional markup
// Modern micro clearfix provides an easy way to contain floats without adding additional markup.
//
// Example usage:
//
Expand All @@ -12,18 +12,12 @@
// }

@mixin clearfix {
*zoom: 1;

&:before,
&:after {
content: " ";
display: table;
}

&:after {
clear: both;
content:"";
display:table;
clear:both;
}
}

// Acknowledgements
// Micro clearfix: [Nicolas Gallagher](http://nicolasgallagher.com/micro-clearfix-hack/)
// Beat *that* clearfix: [Thierry Koblentz](http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php)
114 changes: 114 additions & 0 deletions stylesheets/bourbon/addons/_directional-values.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// directional-property mixins are shorthands
// for writing properties like the following
//
// @include margin(null 0 10px);
// ------
// margin-right: 0;
// margin-bottom: 10px;
// margin-left: 0;
//
// - or -
//
// @include border-style(dotted null);
// ------
// border-top-style: dotted;
// border-bottom-style: dotted;
//
// ------
//
// Note: You can also use false instead of null

@function collapse-directionals($vals) {
$output: null;

$A: nth( $vals, 1 );
$B: if( length($vals) < 2, $A, nth($vals, 2));
$C: if( length($vals) < 3, $A, nth($vals, 3));
$D: if( length($vals) < 2, $A, nth($vals, if( length($vals) < 4, 2, 4) ));

@if $A == 0 { $A: 0 }
@if $B == 0 { $B: 0 }
@if $C == 0 { $C: 0 }
@if $D == 0 { $D: 0 }

@if $A == $B and $A == $C and $A == $D { $output: $A }
@else if $A == $C and $B == $D { $output: $A $B }
@else if $B == $D { $output: $A $B $C }
@else { $output: $A $B $C $D }

@return $output;
}

@function contains-falsy($list) {
@each $item in $list {
@if not $item {
@return true;
}
}

@return false;
}

@mixin directional-property($pre, $suf, $vals) {
// Property Names
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
$left: $pre + "-left" + if($suf, "-#{$suf}", "");
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
$all: $pre + if($suf, "-#{$suf}", "");

// Get list inside $vals (is there a better way?)
@each $val in $vals { $vals: $val; }

$vals: collapse-directionals($vals);

@if contains-falsy($vals) {
@if nth($vals, 1) { #{$top}: nth($vals, 1); }

@if length($vals) == 1 {
@if nth($vals, 1) { #{$right}: nth($vals, 1); }
} @else {
@if nth($vals, 2) { #{$right}: nth($vals, 2); }
}

// prop: top/bottom right/left
@if length($vals) == 2 {
@if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
@if nth($vals, 2) { #{$left}: nth($vals, 2); }

// prop: top right/left bottom
} @else if length($vals) == 3 {
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
@if nth($vals, 2) { #{$left}: nth($vals, 2); }

// prop: top right bottom left
} @else if length($vals) == 4 {
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
@if nth($vals, 4) { #{$left}: nth($vals, 4); }
}

// prop: top/right/bottom/left
} @else {
#{$all}: $vals;
}
}

@mixin margin($vals...) {
@include directional-property(margin, false, $vals);
}

@mixin padding($vals...) {
@include directional-property(padding, false, $vals);
}

@mixin border-style($vals...) {
@include directional-property(border, style, $vals);
}

@mixin border-color($vals...) {
@include directional-property(border, color, $vals);
}

@mixin border-width($vals...) {
@include directional-property(border, width, $vals);
}
7 changes: 7 additions & 0 deletions stylesheets/bourbon/addons/_ellipsis.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin ellipsis($width: 100%) {
display: inline-block;
max-width: $width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
2 changes: 1 addition & 1 deletion stylesheets/bourbon/addons/_font-family.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
$helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
$helvetica: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
$verdana: Verdana, Geneva, sans-serif;
11 changes: 8 additions & 3 deletions stylesheets/bourbon/addons/_hide-text.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@mixin hide-text {
color: transparent;
font: 0/0 a;
text-shadow: none;
overflow: hidden;

&:before {
content: "";
display: block;
width: 0;
height: 100%;
}
}
60 changes: 57 additions & 3 deletions stylesheets/bourbon/addons/_html5-input-types.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $inputs-list: 'input[type="email"]',

$unquoted-inputs-list: ();
@each $input-type in $inputs-list {
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma);
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma) !global;
}

$all-text-inputs: $unquoted-inputs-list;
Expand All @@ -33,15 +33,15 @@ $all-text-inputs: $unquoted-inputs-list;
$all-text-inputs-hover: ();
@each $input-type in $unquoted-inputs-list {
$input-type-hover: $input-type + ":hover";
$all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma);
$all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma) !global;
}

// Focus Pseudo-class
//************************************************************************//
$all-text-inputs-focus: ();
@each $input-type in $unquoted-inputs-list {
$input-type-focus: $input-type + ":focus";
$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma);
$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma) !global;
}

// You must use interpolation on the variable:
Expand All @@ -54,3 +54,57 @@ $all-text-inputs-focus: ();
// #{$all-text-inputs}, textarea {
// border: 1px solid red;
// }



//************************************************************************//
// Generate a variable ($all-button-inputs) with a list of all html5
// input types that have a button-based input, excluding button.
//************************************************************************//
$inputs-button-list: 'input[type="button"]',
'input[type="reset"]',
'input[type="submit"]';

$unquoted-inputs-button-list: ();
@each $input-type in $inputs-button-list {
$unquoted-inputs-button-list: append($unquoted-inputs-button-list, unquote($input-type), comma);
}

$all-button-inputs: $unquoted-inputs-button-list;


// Hover Pseudo-class
//************************************************************************//
$all-button-inputs-hover: ();
@each $input-type in $unquoted-inputs-button-list {
$input-type-hover: $input-type + ":hover";
$all-button-inputs-hover: append($all-button-inputs-hover, $input-type-hover, comma);
}

// Focus Pseudo-class
//************************************************************************//
$all-button-inputs-focus: ();
@each $input-type in $unquoted-inputs-button-list {
$input-type-focus: $input-type + ":focus";
$all-button-inputs-focus: append($all-button-inputs-focus, $input-type-focus, comma);
}

// Active Pseudo-class
//************************************************************************//
$all-button-inputs-active: ();
@each $input-type in $unquoted-inputs-button-list {
$input-type-active: $input-type + ":active";
$all-button-inputs-active: append($all-button-inputs-active, $input-type-active, comma);
}

// You must use interpolation on the variable:
// #{$all-button-inputs}
// #{$all-button-inputs-hover}
// #{$all-button-inputs-focus}
// #{$all-button-inputs-active}

// Example
//************************************************************************//
// #{$all-button-inputs}, button {
// border: 1px solid red;
// }
22 changes: 6 additions & 16 deletions stylesheets/bourbon/addons/_position.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,28 @@
$position: relative;
}

$coordinates: unpack($coordinates);

$top: nth($coordinates, 1);
$right: nth($coordinates, 2);
$bottom: nth($coordinates, 3);
$left: nth($coordinates, 4);

position: $position;

@if $top == auto {
top: $top;
}
@else if not(unitless($top)) {
@if ($top and $top == auto) or (type-of($top) == number and not unitless($top)) {
top: $top;
}

@if $right == auto {
right: $right;
}
@else if not(unitless($right)) {
@if ($right and $right == auto) or (type-of($right) == number and not unitless($right)) {
right: $right;
}

@if $bottom == auto {
bottom: $bottom;
}
@else if not(unitless($bottom)) {
@if ($bottom and $bottom == auto) or (type-of($bottom) == number and not unitless($bottom)) {
bottom: $bottom;
}

@if $left == auto {
left: $left;
}
@else if not(unitless($left)) {
@if ($left and $left == auto) or (type-of($left) == number and not unitless($left)) {
left: $left;
}
}
Loading

0 comments on commit aa075a5

Please sign in to comment.