-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Big mixing upgrade, many from https://github.com/thoughtbot/bourbon/t…
…ree/5bdaa07c0fcfa6f1e3507185fa805741eeb33952 before they deprecated the old webkit gradients syntax (Kickoff still needs it)
- Loading branch information
1 parent
b34893d
commit cc5ba71
Showing
34 changed files
with
491 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ img { | |
&.left { | ||
margin:0 20px 0 0; | ||
} | ||
|
||
&.right { | ||
margin:0 0 0 20px; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
@import "functions/compact"; | ||
@import "functions/deprecated-webkit-gradient"; | ||
@import "functions/golden-ratio"; | ||
@import "functions/linear-gradient"; | ||
@import "functions/modular-scale"; | ||
@import "functions/px-to-em"; | ||
@import "functions/radial-gradient"; | ||
@import "functions/render-gradients"; | ||
@import "functions/tint-shade"; | ||
@import "functions/transition-property-name"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Custom Helpers | ||
@import "helpers/deprecated-webkit-gradient"; | ||
@import "helpers/gradient-positions-parser"; | ||
@import "helpers/linear-positions-parser"; | ||
@import "helpers/radial-arg-parser"; | ||
@import "helpers/radial-positions-parser"; | ||
@import "helpers/render-gradients"; | ||
@import "helpers/shape-size-stripper"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@function golden-ratio($value, $increment) { | ||
@return modular-scale($value, $increment, $golden) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
@function linear-gradient($gradients...) { | ||
$type: linear; | ||
$type-gradient: append($type, $gradients, comma); | ||
@function linear-gradient($pos, $gradients...) { | ||
$type: linear; | ||
$pos-type: type-of(nth($pos, 1)); | ||
|
||
@return $type-gradient; | ||
// if $pos doesn't exist, fix $gradient | ||
@if ($pos-type == color) or (nth($pos, 1) == "transparent") { | ||
$gradients: zip($pos $gradients); | ||
$pos: false; | ||
} | ||
|
||
$type-gradient: $type, $pos, $gradients; | ||
@return $type-gradient; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,66 @@ | ||
// Scaling Varaibles | ||
$golden: 1.618; | ||
$minor-second: 1.067; | ||
$major-second: 1.125; | ||
$minor-third: 1.2; | ||
$major-third: 1.25; | ||
$perfect-fourth: 1.333; | ||
$augmented-fourth: 1.414; | ||
$perfect-fifth: 1.5; | ||
$minor-sixth: 1.6; | ||
$major-sixth: 1.667; | ||
$minor-seventh: 1.778; | ||
$major-seventh: 1.875; | ||
$octave: 2; | ||
$major-tenth: 2.5; | ||
$major-eleventh: 2.667; | ||
$major-twelfth: 3; | ||
$double-octave: 4; | ||
|
||
@function modular-scale($value, $increment, $ratio) { | ||
$v1: nth($value, 1); | ||
$v2: nth($value, length($value)); | ||
$value: $v1; | ||
|
||
// scale $v2 to just above $v1 | ||
@while $v2 > $v1 { | ||
$v2: ($v2 / $ratio); // will be off-by-1 | ||
} | ||
@while $v2 < $v1 { | ||
$v2: ($v2 * $ratio); // will fix off-by-1 | ||
} | ||
|
||
// check AFTER scaling $v2 to prevent double-counting corner-case | ||
$double-stranded: $v2 > $v1; | ||
|
||
@if $increment > 0 { | ||
@for $i from 1 through $increment { | ||
$value: ($value * $ratio); | ||
@if $double-stranded and ($v1 * $ratio) > $v2 { | ||
$value: $v2; | ||
$v2: ($v2 * $ratio); | ||
} @else { | ||
$v1: ($v1 * $ratio); | ||
$value: $v1; | ||
} | ||
} | ||
} | ||
|
||
@if $increment < 0 { | ||
$increment: abs($increment); | ||
@for $i from 1 through $increment { | ||
$value: ($value / $ratio); | ||
// adjust $v2 to just below $v1 | ||
@if $double-stranded { | ||
$v2: ($v2 / $ratio); | ||
} | ||
|
||
@for $i from $increment through -1 { | ||
@if $double-stranded and ($v1 / $ratio) < $v2 { | ||
$value: $v2; | ||
$v2: ($v2 / $ratio); | ||
} @else { | ||
$v1: ($v1 / $ratio); | ||
$value: $v1; | ||
} | ||
} | ||
} | ||
|
||
@return $value; | ||
} | ||
|
||
// div { | ||
// Increment Up GR with positive value | ||
// font-size: modular-scale(14px, 1, 1.618); // returns: 22.652px | ||
// | ||
// Increment Down GR with negative value | ||
// font-size: modular-scale(14px, -1, 1.618); // returns: 8.653px | ||
// | ||
// Can be used with ceil(round up) or floor(round down) | ||
// font-size: floor( modular-scale(14px, 1, 1.618) ); // returns: 22px | ||
// font-size: ceil( modular-scale(14px, 1, 1.618) ); // returns: 23px | ||
// } | ||
// | ||
// modularscale.com | ||
|
||
@function golden-ratio($value, $increment) { | ||
@return modular-scale($value, $increment, 1.618) | ||
} | ||
|
||
// div { | ||
// font-size: golden-ratio(14px, 1); // returns: 22.652px | ||
// } | ||
// | ||
// goldenratiocalculator.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Add percentage of white to a color | ||
@function tint($color, $percent){ | ||
@return mix(white, $color, $percent); | ||
@return mix(white, $color, $percent); | ||
} | ||
|
||
// Add percentage of black to a color | ||
@function shade($color, $percent){ | ||
@return mix(black, $color, $percent); | ||
@return mix(black, $color, $percent); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Render Deprecated Webkit Gradient - Linear || Radial | ||
//************************************************************************// | ||
@function _deprecated-webkit-gradient($type, | ||
$deprecated-pos1, $deprecated-pos2, | ||
$full, | ||
$deprecated-radius1: false, $deprecated-radius2: false) { | ||
$gradient-list: (); | ||
$gradient: false; | ||
$full-length: length($full); | ||
$percentage: false; | ||
$gradient-type: $type; | ||
|
||
@for $i from 1 through $full-length { | ||
$gradient: nth($full, $i); | ||
|
||
@if length($gradient) == 2 { | ||
$color-stop: color-stop(nth($gradient, 2), nth($gradient, 1)); | ||
$gradient-list: join($gradient-list, $color-stop, comma); | ||
} | ||
@else if $gradient != null { | ||
@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, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list); | ||
} | ||
@else if $type == linear { | ||
$gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list); | ||
} | ||
@return $gradient; | ||
} |
Oops, something went wrong.