Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Dart Sass deprecation warning - global built-in function str-leng… #233

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading