mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
@ -3,11 +3,11 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
@function color-brightness($color-value) {
|
||||
@return (red($color-value) * 0.299 + green($color-value) * 0.587 + blue($color-value) * 0.114) / 255 * 100%;
|
||||
@return (red($color-value) * .299 + green($color-value) * .587 + blue($color-value) * .114) / 255 * 100%;
|
||||
}
|
||||
|
||||
|
||||
@function color-inverse($color-value, $dark: black, $light: white) {
|
||||
@function color-inverse($color-value, $dark: #000, $light: #fff) {
|
||||
$brightness: color-brightness($color-value);
|
||||
$red: red($color-value);
|
||||
$green: green($color-value);
|
||||
@ -29,17 +29,17 @@
|
||||
|
||||
|
||||
@function toolbar-button-inverse($color-value) {
|
||||
@return color-inverse($color-value, $dark: $toolbar-md-button-color, $light: white);
|
||||
@return color-inverse($color-value, $dark: $toolbar-md-button-color, $light: #fff);
|
||||
}
|
||||
|
||||
|
||||
@function color-shade($color-value, $amount:8%) {
|
||||
$lightness: lightness($color-value);
|
||||
|
||||
$shade: white;
|
||||
$shade: #fff;
|
||||
|
||||
@if ($lightness > 50) {
|
||||
$shade: black;
|
||||
$shade: #000;
|
||||
}
|
||||
|
||||
@return mix($shade, $color-value, $amount);
|
||||
@ -57,7 +57,7 @@
|
||||
// String Replace Function
|
||||
// --------------------------------------------------
|
||||
|
||||
@function str-replace($string, $search, $replace: '') {
|
||||
@function str-replace($string, $search, $replace: "") {
|
||||
$index: str-index($string, $search);
|
||||
|
||||
@if $index {
|
||||
@ -72,5 +72,5 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
@function url-encode($val) {
|
||||
@return str-replace($val, ' ', '%20');
|
||||
@return str-replace($val, " ", "%20");
|
||||
}
|
||||
|
Reference in New Issue
Block a user