Skip to content

Commit

Permalink
fix: Fix SASS deprecation warnings (#756)
Browse files Browse the repository at this point in the history
* Fix SASS deprecation warnings

* Linting fix

---------

Co-authored-by: Zack Colton <[email protected]>
  • Loading branch information
HappyNTH and zst-c authored Nov 21, 2024
1 parent a25f6bd commit 614b9a8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
@import './_tiptap';
@import './_swal';
@import './_table';
@import './_datepicker';
@import './_misc';
@use 'sass:string';
@use '_tiptap';
@use '_swal';
@use '_table';
@use '_datepicker';
@use '_misc';
@import '@fortawesome/fontawesome-svg-core/styles.css';

@function str-replace($string, $search, $replace: '') {
$index: str-index($string, $search);
$index: string.index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace +
@return string.slice($string, 1, $index - 1) + $replace +
str-replace(
str-slice($string, $index + str-length($search)),
string.slice($string, $index + string.length($search)),
$search,
$replace
);
Expand Down Expand Up @@ -63,7 +64,7 @@
}
.btn-#{$color}:hover:not(.disabled):not([disabled]) {
$hov-color: 'bg-sta-#{$color}-dark';
@if (str-index($color, '-light')) {
@if (string.index($color, '-light')) {
$new-col: str-replace($color, '-light', '');
$hov-color: 'bg-sta-#{$new-col}-dark';
}
Expand Down

0 comments on commit 614b9a8

Please sign in to comment.