Skip to content

Commit

Permalink
Fix Dart Sass deprecation warning - global built-in function str-leng…
Browse files Browse the repository at this point in the history
…th and str-slice are deprecated, changed to string.length and string.slice - updated source.
  • Loading branch information
posttoast committed Nov 6, 2024
1 parent 86b2cc9 commit 6ceeeaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/helpers/_trim.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6ceeeaa

Please # to comment.