Skip to content

Commit

Permalink
Merge pull request #233 from posttoast/master
Browse files Browse the repository at this point in the history
Fix Dart Sass deprecation warning - global built-in function str-leng…
  • Loading branch information
jackmcpickle authored Nov 6, 2024
2 parents 51bff06 + 6ceeeaa commit e620564
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/_include-media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,10 @@ $im-no-media-expressions: ('screen', 'portrait', 'landscape') !default;
///

@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
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 e620564

Please sign in to comment.