|
16 | 16 | $properties: append((), $properties);
|
17 | 17 | }
|
18 | 18 |
|
| 19 | + // Use class prefix if present |
| 20 | + $property-class-prefix: if(map-has-key($utility, prefix), map-get($utility, prefix), null); |
| 21 | + $property-class-prefix: if($property-class-prefix == null, "", $property-class-prefix); |
| 22 | + |
19 | 23 | // Use custom class if present
|
20 | 24 | $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
|
21 | 25 | $property-class: if($property-class == null, "", $property-class);
|
|
29 | 33 | $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
|
30 | 34 |
|
31 | 35 | // Generate also CSS Variable
|
32 |
| - $generate-vars: if(map-has-key($utility, vars), map-get($utility, vars), "false"); |
33 |
| - $generate-rtl: if(map-has-key($utility, rtl), map-get($utility, rtl), "false"); |
| 36 | + $generate-vars: if(map-has-key($utility, vars), map-get($utility, vars), false); |
| 37 | + $generate-only-vars: if(map-has-key($utility, only-vars), map-get($utility, only-vars), false); |
| 38 | + |
| 39 | + // Generate RTL version |
| 40 | + $generate-rtl: if(map-has-key($utility, rtl), map-get($utility, rtl), false); |
34 | 41 |
|
35 | 42 | @if map-get($utility, rfs) {
|
36 | 43 | // Inside the media query
|
|
51 | 58 | @if $is-rtl == false {
|
52 | 59 | /* rtl:begin:remove */
|
53 | 60 | }
|
54 |
| - .#{$property-class + $infix + $property-class-modifier} { |
| 61 | + .#{$property-class-prefix + $property-class + $infix + $property-class-modifier} { |
55 | 62 | @each $property in $properties {
|
56 |
| - @if $generate-vars == true { |
57 |
| - #{$property}: var(--#{$variable-prefix}#{$key}, $value) if($enable-important-utilities, !important, null); |
| 63 | + @if $generate-vars == true or $generate-only-vars == true { |
| 64 | + @if $generate-only-vars { |
| 65 | + #{$property}: var(--#{$variable-prefix}#{$key}) if($enable-important-utilities, !important, null); |
| 66 | + } |
| 67 | + @else { |
| 68 | + #{$property}: var(--#{$variable-prefix}#{$key}, $value) if($enable-important-utilities, !important, null); |
| 69 | + } |
58 | 70 | }
|
59 | 71 | @else {
|
60 | 72 | @if $generate-rtl == true {
|
|
0 commit comments