Skip to content

Commit f4ee3d3

Browse files
committed
refactor: update utilities generator
1 parent a565e47 commit f4ee3d3

File tree

1 file changed

+8
-31
lines changed

1 file changed

+8
-31
lines changed

scss/mixins/_utilities.scss

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
// Generate RTL version
3636
$generate-rtl: if(map-has-key($utility, rtl), map-get($utility, rtl), false);
3737

38-
// // Add theme prefix
39-
// $theme-prefix: if(map-has-key($utility, theme-prefix), map-get($utility, theme-prefix), false);
38+
// Add theme prefix
39+
$theme-prefix: if(map-has-key($utility, theme-prefix), map-get($utility, theme-prefix), false);
4040

4141
@if map-get($utility, rfs) {
4242
// Inside the media query
@@ -60,34 +60,6 @@
6060
/* rtl:begin:remove */
6161
}
6262

63-
// .#{$property-class + $infix + $property-class-modifier} {
64-
// @each $property in $properties {
65-
// @if $generate-vars == true or $generate-only-vars == true {
66-
// @if $generate-only-vars {
67-
// @if $generate-rtl == true {
68-
// @include ltr-rtl($property, var(--#{$variable-prefix}#{$key}), null, null, if($enable-important-utilities, !important, null));
69-
// }
70-
// @else {
71-
// #{$property}: var(--#{$variable-prefix}#{$key}) if($enable-important-utilities, !important, null);
72-
// }
73-
// }
74-
// @else {
75-
// @if $generate-rtl == true {
76-
// @include ltr-rtl($property, var(--#{$variable-prefix}#{$key}, $value), null, null, if($enable-important-utilities, !important, null));
77-
// }
78-
// @else {
79-
// #{$property}: var(--#{$variable-prefix}#{$key}, $value) if($enable-important-utilities, !important, null);
80-
// }
81-
// }
82-
// }
83-
// @else {
84-
// @if $generate-rtl == true {
85-
// @include ltr-rtl($property, $value, null, null, if($enable-important-utilities, !important, null));
86-
// }
87-
// @else {
88-
// #{$property}: $value if($enable-important-utilities, !important, null);
89-
// }
90-
// }
9163
@if $is-css-var {
9264
.#{$property-class + $infix + $property-class-modifier} {
9365
--#{$variable-prefix}#{$property-class}: #{$value};
@@ -106,7 +78,12 @@
10678
--#{$variable-prefix}#{$local-var}: #{$value};
10779
}
10880
}
109-
#{$property}: $value if($enable-important-utilities, !important, null);
81+
@if $generate-rtl == true {
82+
@include ltr-rtl($property, $value, null, null, if($enable-important-utilities, !important, null));
83+
}
84+
@else {
85+
#{$property}: $value if($enable-important-utilities, !important, null);
86+
}
11087
}
11188
}
11289

0 commit comments

Comments
 (0)