Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Update dist to v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil LaPier committed Apr 19, 2014
1 parent ccf954f commit 9154ef4
Show file tree
Hide file tree
Showing 21 changed files with 310 additions and 394 deletions.
11 changes: 8 additions & 3 deletions dist/_bourbon-deprecated-upcoming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
// These mixins/functions are deprecated
// They will be removed in the next MAJOR version release
//************************************************************************//
@mixin inline-block {
display: inline-block;
@warn "inline-block mixin is deprecated and will be removed in the next major version release";
@mixin box-shadow ($shadows...) {
@include prefixer(box-shadow, $shadows, spec);
@warn "box-shadow is deprecated and will be removed in the next major version release";
}

@mixin background-size ($lengths...) {
@include prefixer(background-size, $lengths, spec);
@warn "background-size is deprecated and will be removed in the next major version release";
}
11 changes: 3 additions & 8 deletions dist/_bourbon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,23 @@
@import "settings/px-to-em";

// Custom Helpers
@import "helpers/convert-units";
@import "helpers/gradient-positions-parser";
@import "helpers/is-num";
@import "helpers/linear-angle-parser";
@import "helpers/linear-gradient-parser";
@import "helpers/linear-positions-parser";
@import "helpers/linear-side-corner-parser";
@import "helpers/radial-arg-parser";
@import "helpers/radial-positions-parser";
@import "helpers/radial-gradient-parser";
@import "helpers/render-gradients";
@import "helpers/shape-size-stripper";
@import "helpers/str-to-num";

// Custom Functions
@import "functions/assign";
@import "functions/color-lightness";
@import "functions/flex-grid";
@import "functions/golden-ratio";
@import "functions/grid-width";
@import "functions/linear-gradient";
@import "functions/modular-scale";
@import "functions/px-to-em";
@import "functions/px-to-rem";
@import "functions/radial-gradient";
@import "functions/strip-units";
@import "functions/tint-shade";
@import "functions/transition-property-name";
Expand All @@ -48,6 +42,7 @@
@import "css3/hyphens";
@import "css3/hidpi-media-query";
@import "css3/image-rendering";
@import "css3/inline-block";
@import "css3/keyframes";
@import "css3/linear-gradient";
@import "css3/perspective";
Expand Down
54 changes: 39 additions & 15 deletions dist/addons/_html5-input-types.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,29 @@ $inputs-list: 'input[type="email"]',
'input[type="time"]',
'input[type="week"]';

// Bare inputs
//************************************************************************//
$all-text-inputs: assign-inputs($inputs-list);
$unquoted-inputs-list: ();
@each $input-type in $inputs-list {
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma);
}

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


// Hover Pseudo-class
//************************************************************************//
$all-text-inputs-hover: assign-inputs($inputs-list, hover);
$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);
}

// Focus Pseudo-class
//************************************************************************//
$all-text-inputs-focus: assign-inputs($inputs-list, focus);


$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);
}

// You must use interpolation on the variable:
// #{$all-text-inputs}
Expand All @@ -55,23 +65,37 @@ $inputs-button-list: 'input[type="button"]',
'input[type="reset"]',
'input[type="submit"]';

// Bare inputs
//************************************************************************//
$all-button-inputs: assign-inputs($inputs-button-list);
$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: assign-inputs($inputs-button-list, hover);
$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: assign-inputs($inputs-button-list, focus);
$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: assign-inputs($inputs-button-list, active);


$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}
Expand Down
10 changes: 5 additions & 5 deletions dist/addons/_position.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@mixin position ($position: relative, $coordinates: null null null null) {
@mixin position ($position: relative, $coordinates: 0 0 0 0) {

@if type-of($position) == list {
$coordinates: $position;
Expand All @@ -14,19 +14,19 @@

position: $position;

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

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

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

@if ($left and $left == auto) or (type-of($left) == number) {
@if ($left and $left == auto) or (type-of($left) == number and not unitless($left)) {
left: $left;
}
}
10 changes: 5 additions & 5 deletions dist/addons/_prefixer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
}

@mixin disable-prefix-for-all() {
$prefix-for-webkit: false !global;
$prefix-for-mozilla: false !global;
$prefix-for-microsoft: false !global;
$prefix-for-opera: false !global;
$prefix-for-spec: false !global;
$prefix-for-webkit: false;
$prefix-for-mozilla: false;
$prefix-for-microsoft: false;
$prefix-for-opera: false;
$prefix-for-spec: false;
}
46 changes: 37 additions & 9 deletions dist/addons/_size.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
@mixin size($size) {
$height: nth($size, 1);
$width: $height;
@if length($size) == 1 {
@if $size == auto {
width: $size;
height: $size;
}

@if length($size) > 1 {
$height: nth($size, 2);
}
@else if unitless($size) {
width: $size + px;
height: $size + px;
}

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

@if $width == auto or (type-of($height) == number and not unitless($width)) {
width: $width;
// Width x Height
@if length($size) == 2 {
$width: nth($size, 1);
$height: nth($size, 2);

@if $width == auto {
width: $width;
}
@else if not(unitless($width)) {
width: $width;
}
@else if unitless($width) {
width: $width + px;
}

@if $height == auto {
height: $height;
}
@else if not(unitless($height)) {
height: $height;
}
@else if unitless($height) {
height: $height + px;
}
}
}
64 changes: 35 additions & 29 deletions dist/css3/_background-image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,45 @@
//************************************************************************//

@mixin background-image($images...) {
$webkit-images: ();
$spec-images: ();

@each $image in $images {
$webkit-image: ();
$spec-image: ();

@if (type-of($image) == string) {
$url-str: str-slice($image, 0, 3);
$gradient-type: str-slice($image, 0, 6);
background-image: _add-prefix($images, webkit);
background-image: _add-prefix($images);
}

@if $url-str == "url" {
$webkit-image: $image;
$spec-image: $image;
@function _add-prefix($images, $vendor: false) {
$images-prefixed: ();
$gradient-positions: false;
@for $i from 1 through length($images) {
$type: type-of(nth($images, $i)); // Get type of variable - List or String

// If variable is a list - Gradient
@if $type == list {
$gradient-type: nth(nth($images, $i), 1); // linear or radial
$gradient-pos: null;
$gradient-args: null;

@if ($gradient-type == linear) or ($gradient-type == radial) {
$gradient-pos: nth(nth($images, $i), 2); // Get gradient position
$gradient-args: nth(nth($images, $i), 3); // Get actual gradient (red, blue)
}

@else if $gradient-type == "linear" {
$gradients: _linear-gradient-parser($image);
$webkit-image: map-get($gradients, webkit-image);
$spec-image: map-get($gradients, spec-image);
@else {
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
}

@else if $gradient-type == "radial" {
$gradients: _radial-gradient-parser($image);
$webkit-image: map-get($gradients, webkit-image);
$spec-image: map-get($gradients, spec-image);
}
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
$gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
$images-prefixed: append($images-prefixed, $gradient, comma);
}
// If variable is a string - Image
@else if $type == string {
$images-prefixed: join($images-prefixed, nth($images, $i), comma);
}

$webkit-images: append($webkit-images, $webkit-image, comma);
$spec-images: append($spec-images, $spec-image, comma);
}

background-image: $webkit-images;
background-image: $spec-images;
@return $images-prefixed;
}

//Examples:
//@include background-image(linear-gradient(top, orange, red));
//@include background-image(radial-gradient(50% 50%, cover circle, orange, red));
//@include background-image(url("/images/a.png"), linear-gradient(orange, red));
//@include background-image(url("image.png"), linear-gradient(orange, red), url("image.png"));
//@include background-image(linear-gradient(hsla(0, 100%, 100%, 0.25) 0%, hsla(0, 100%, 100%, 0.08) 50%, transparent 50%), linear-gradient(orange, red));
Loading

0 comments on commit 9154ef4

Please sign in to comment.