-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #408 from BeAPI/feature/fluid
fluid feature
Showing
10 changed files
with
146 additions
and
34 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
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,32 @@ | ||
/** | ||
* Fluid size | ||
* | ||
* Converted from source: : https://www.aleksandrhovhannisyan.com/blog/fluid-type-scale-with-css-clamp/ | ||
* | ||
* Convert value px to fluid typography and spacing using clamp | ||
* | ||
* @author Cédric Andrietti | ||
* | ||
* @param $min -> Minimal display size (mobile) | ||
* @param $max -> Maximal display size (Desktop) | ||
* @param $start -> Start breakpoint | ||
* @param $end -> End breakpoint | ||
* | ||
* Examples : | ||
* | ||
* h1 { | ||
* font-size: #{fluid-size(58px, 156px, sm, md)}; | ||
* line-height: #{fluid-size(1.05, 1.2)}; | ||
* } | ||
* | ||
*/ | ||
|
||
@use "sass:map"; | ||
@use "sass:math"; | ||
|
||
@function fluid-size($min, $max, $start: xs, $end: sm) { | ||
$start: math.div(map.get($breakpoints, $start), 100); | ||
$end: math.div(map.get($breakpoints, $end), 100); | ||
|
||
@return clamp(#{$min}, #{$min} + (1vw - #{$start}px) / #{$end - $start} * #{strip-units($max - $min)}, #{$max}); | ||
} |
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
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,4 +1,9 @@ | ||
/* Main Layout */ | ||
.container { | ||
.container, | ||
.container-wide { | ||
@include container; | ||
} | ||
|
||
.container-default { | ||
@include container($container-default); | ||
} |
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