13 lines
338 B
SCSS
13 lines
338 B
SCSS
@function encodehex($string) {
|
|
@return '%23' + string.slice($string, 1, 6);
|
|
}
|
|
|
|
@function encodecolor($string) {
|
|
@if type-of($string) == 'color' and str-index(#{$string}, '#') == 1 {
|
|
$hex: str-slice(ie-hex-str($string), 4);
|
|
$string: unquote('#{$hex}');
|
|
|
|
@return '%23' + $string;
|
|
}
|
|
@return $string;
|
|
} |