Skip to content

Commit

Permalink
fix(client): update sass functions to use new module syntax (#2784)
Browse files Browse the repository at this point in the history
- Replace str-index with string.index
- Replace str-slice with string.slice
- Replace str-length with string.length

These changes address deprecation warnings from Dart Sass 3.0.0
  • Loading branch information
mapxn authored Oct 27, 2024
1 parent 97199ec commit 5982545
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/client/src/styles/helpers/_svg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
$index: string.index($string, $search);
@return if(
$index,
str-slice($string, 1, $index - 1) + $replace +
string.slice($string, 1, $index - 1) + $replace +
string-replace(
str-slice($string, $index + str-length($search)),
string.slice($string, $index + string.length($search)),
$search,
$replace
),
Expand All @@ -21,7 +21,7 @@
$index: 0;
$loops: math.ceil(math.div(string.length($svg), $slice));

@if not str-index($svg, xmlns) {
@if not string.index($svg, xmlns) {
$svg: string-replace(
$svg,
'<svg',
Expand Down

0 comments on commit 5982545

Please sign in to comment.