compilation du nouveau css
This commit is contained in:
parent
063f84f1ad
commit
75a822112f
20 changed files with 2804 additions and 0 deletions
40
src/scss/function/_calc-stack.scss
Normal file
40
src/scss/function/_calc-stack.scss
Normal file
|
@ -0,0 +1,40 @@
|
|||
@charset "utf-8";
|
||||
|
||||
// Built-In Modules
|
||||
@use 'sass:math';
|
||||
|
||||
// Included Modules
|
||||
@use 'calc-font-size';
|
||||
@use 'strip-unit';
|
||||
|
||||
@function stack($line-height: 1, $font-size: 16px, $base-size: 16px) {
|
||||
@if math.unit($font-size) == '%' {
|
||||
$font-size: calc-font-size.percent2px($font-size, $base-size);
|
||||
} @else if math.unit($font-size) == 'em' {
|
||||
$font-size: calc-font-size.em2px($font-size, $base-size);
|
||||
} @else if math.unit($font-size) == 'rem' {
|
||||
$font-size: calc-font-size.rem2px($font-size, $base-size);
|
||||
}
|
||||
|
||||
$line-height-px-unit: strip-unit.strip-unit($line-height) * strip-unit.strip-unit($font-size);
|
||||
|
||||
$stack: calc-font-size.px2rem($line-height-px-unit, $base-size);
|
||||
|
||||
@return $stack;
|
||||
}
|
||||
|
||||
@function line-height($line-space: 4px, $font-size: 16px, $base-size: 16px) {
|
||||
@if math.unit($font-size) == '%' {
|
||||
$font-size: calc-font-size.percent2px($font-size, $base-size);
|
||||
} @else if math.unit($font-size) == 'em' {
|
||||
$font-size: calc-font-size.em2px($font-size, $base-size);
|
||||
} @else if math.unit($font-size) == 'rem' {
|
||||
$font-size: calc-font-size.rem2px($font-size, $base-size);
|
||||
}
|
||||
|
||||
$font-size: strip-unit.strip-unit($font-size);
|
||||
$line-space: strip-unit.strip-unit($line-space);
|
||||
$line-height: math.div(($line-space * 2) + $font-size, $font-size);
|
||||
|
||||
@return $line-height;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue