From 6ceeeaa795cc4562eaf8a44bb19417ae3a95a3fc Mon Sep 17 00:00:00 2001 From: Vincent Bovelander Date: Wed, 6 Nov 2024 08:48:36 +0100 Subject: [PATCH] Fix Dart Sass deprecation warning - global built-in function str-length and str-slice are deprecated, changed to string.length and string.slice - updated source. --- src/helpers/_trim.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/_trim.scss b/src/helpers/_trim.scss index 2e79237..baebe2d 100644 --- a/src/helpers/_trim.scss +++ b/src/helpers/_trim.scss @@ -13,10 +13,10 @@ /// @function str-trim($string) { - @if (str-slice($string, 1, 1) == ' ') { - @return str-trim(str-slice($string, 2)); - } @else if (str-slice($string, str-length($string), -1) == ' ') { - @return str-trim(str-slice($string, 1, -2)); + @if (string.slice($string, 1, 1) == ' ') { + @return str-trim(string.slice($string, 2)); + } @else if (string.slice($string, string.length($string), -1) == ' ') { + @return str-trim(string.slice($string, 1, -2)); } @else { @return $string; }