Unquote string when removing the hash from a color

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-01-11 10:09:51 +01:00 committed by Morris Jobke
parent 3ec20be575
commit a2f024ae1d
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 2 additions and 1 deletions

View File

@ -27,9 +27,10 @@
* @return string The color without #
*/
@function remove-hash-from-color($color) {
$color: unquote($color);
$index: str-index(inspect($color), '#');
@if $index {
$color: str-slice(inspect($color), 0, 1) + str-slice(inspect($color), 3);
$color: str-slice(inspect($color), 2);
}
@return $color;
}