mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°4628 - Upgrade bulma lib to v0.9.4 to avoid hack from N°4481
This commit is contained in:
46
node_modules/bulma-scss/utilities/_functions.scss
generated
vendored
46
node_modules/bulma-scss/utilities/_functions.scss
generated
vendored
@@ -74,7 +74,7 @@
|
||||
}
|
||||
@else if $exp < 0 {
|
||||
@for $i from 1 through -$exp {
|
||||
$value: $value / $number;
|
||||
$value: divide($value, $number);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,13 +90,13 @@
|
||||
|
||||
@each $name, $value in $color-rgb {
|
||||
$adjusted: 0;
|
||||
$value: $value / 255;
|
||||
$value: divide($value, 255);
|
||||
|
||||
@if $value < 0.03928 {
|
||||
$value: $value / 12.92;
|
||||
$value: divide($value, 12.92);
|
||||
}
|
||||
@else {
|
||||
$value: ($value + 0.055) / 1.055;
|
||||
$value: divide($value + 0.055, 1.055);
|
||||
$value: powerNumber($value, 2);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@function findLightColor($color) {
|
||||
@function findLightColor($color, $l: 96%) {
|
||||
@if type-of($color) == "color" {
|
||||
$l: 96%;
|
||||
|
||||
@@ -129,9 +129,8 @@
|
||||
@return $background;
|
||||
}
|
||||
|
||||
@function findDarkColor($color) {
|
||||
@function findDarkColor($color, $base-l: 29%) {
|
||||
@if type-of($color) == "color" {
|
||||
$base-l: 29%;
|
||||
$luminance: colorLuminance($color);
|
||||
$luminance-delta: 0.53 - $luminance;
|
||||
$target-l: round($base-l + $luminance-delta * 53);
|
||||
@@ -165,3 +164,36 @@
|
||||
|
||||
@return lighten($color, $amount);
|
||||
}
|
||||
|
||||
// Custom divide function by @mdo from https://github.com/twbs/bootstrap/pull/34245
|
||||
// Replaces old slash division deprecated in Dart Sass
|
||||
@function divide($dividend, $divisor, $precision: 10) {
|
||||
$sign: if($dividend > 0 and $divisor > 0, 1, -1);
|
||||
$dividend: abs($dividend);
|
||||
$divisor: abs($divisor);
|
||||
$quotient: 0;
|
||||
$remainder: $dividend;
|
||||
|
||||
@if $dividend == 0 {
|
||||
@return 0;
|
||||
}
|
||||
|
||||
@if $divisor == 0 {
|
||||
@error "Cannot divide by 0";
|
||||
}
|
||||
|
||||
@if $divisor == 1 {
|
||||
@return $dividend;
|
||||
}
|
||||
|
||||
@while $remainder >= $divisor {
|
||||
$quotient: $quotient + 1;
|
||||
$remainder: $remainder - $divisor;
|
||||
}
|
||||
|
||||
@if $remainder > 0 and $precision > 0 {
|
||||
$remainder: divide($remainder * 10, $divisor, $precision - 1) * 0.1;
|
||||
}
|
||||
|
||||
@return ($quotient + $remainder) * $sign;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user