Skip to content

Commit

Permalink
version 3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tedw committed Oct 8, 2020
1 parent 664300d commit 4e87c0a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
29 changes: 22 additions & 7 deletions dist/_frontline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// _______ ____ _ __________ _____ ______
// / __/ _ \/ __ \/ |/ /_ __/ / / _/ |/ / __/
// / _// , _/ /_/ / / / / / /___/ // / _/
// /_/ /_/|_|\____/_/|_/ /_/ /____/___/_/|_/___/ v3.7.8
// /_/ /_/|_|\____/_/|_/ /_/ /____/___/_/|_/___/ v3.8.0
//
// This project is licensed under the terms of the MIT license

Expand Down Expand Up @@ -364,7 +364,7 @@ $fs-easings: (
/// p {
/// font-size: fs-scale(20px, 30px, 320px, 400px);
/// }
@function fs-scale($start, $end, $min-width, $max-width) {
@function fs-scale($start, $end, $min-width, $max-width, $units: 'rem') {
@if $start > 0 and $end > 0 and unit($start) != unit($end) {
@error '🔴 fs-scale() units don’t match';
}
Expand All @@ -377,7 +377,12 @@ $fs-easings: (
@return $slope * 100vw;
}
@else {
@return calc(#{$slope * 100vw} + #{fs-rem($intercept)});
@if $units == 'em' {
@return calc(#{$slope * 100vw} + #{fs-em($intercept)});
}
@else {
@return calc(#{$slope * 100vw} + #{fs-rem($intercept)});
}
}
}

Expand Down Expand Up @@ -2105,25 +2110,35 @@ $fs-debug-mode: false !default;
/// @include fs-scale(font-size, 20px, 30px, 320px, 400px);
/// @example scss
/// @include fs-scale(margin-bottom margin-top, 10px, 20px, 500px, 600px);
@mixin fs-scale($properties, $start, $end, $min-width, $max-width, $fallback: true) {
@mixin fs-scale($properties, $start, $end, $min-width, $max-width, $fallback: true, $units: 'rem') {
// Starting size
@if $fallback {
@each $property in $properties {
#{$property}: fs-rem($start);
@if $units == 'em' {
#{$property}: fs-em($start);
}
@else {
#{$property}: fs-rem($start);
}
}
}

// Scale up with calc()
@include fs-min-width($min-width) {
@each $property in $properties {
#{$property}: fs-scale($start, $end, $min-width, $max-width);
#{$property}: fs-scale($start, $end, $min-width, $max-width, $units);
}
}

// Final size
@include fs-min-width($max-width) {
@each $property in $properties {
#{$property}: fs-rem($end);
@if $units == 'em' {
#{$property}: fs-em($end);
}
@else {
#{$property}: fs-rem($end);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "frontline-sass",
"name": "frontline-sass",
"version": "3.7.8",
"version": "3.8.0",
"description": "Threespot's base Sass framework",
"engines": {
"node": ">=6.0.0",
Expand Down

0 comments on commit 4e87c0a

Please sign in to comment.