Skip to content

Commit 75750ff

Browse files
committed
feat: add .text-bg-#{$color}-gradient utilities
1 parent ef61c27 commit 75750ff

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scss/helpers/_color-bg.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
}
77
}
88

9+
@each $color, $value in $theme-gradients {
10+
.text-bg-#{$color}-gradient {
11+
color: color-contrast(map-get($value, "start")) if($enable-important-utilities, !important, null);
12+
background-color: var(--#{$prefix}#{$color});
13+
background-image: linear-gradient(45deg, var(--#{$prefix}#{$color}-start) 0%, var(--#{$prefix}#{$color}-stop) 100%);
14+
}
15+
}
16+
917
@if $enable-dark-mode {
1018
@include color-mode(dark) {
1119
@each $color, $value in $theme-colors-dark {
@@ -15,5 +23,11 @@
1523
background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
1624
}
1725
}
26+
27+
@each $color, $value in $theme-gradients-dark {
28+
.text-bg-#{$color}-gradient {
29+
color: color-contrast(map-get($value, "start")) if($enable-important-utilities, !important, null);
30+
}
31+
}
1832
}
1933
}

0 commit comments

Comments
 (0)