Skip to content

Commit 113e4c7

Browse files
committed
Added transparent options
1 parent 7a06be2 commit 113e4c7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

scss/utilities/static/_gradient.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
background-image: linear-gradient(to top left, var(--#{$prefix}gradient)) !important;
2929
}
3030

31+
// For transparent values
32+
.start-transparent,
33+
.start-transparent-hover:hover {
34+
--#{$prefix}start-color: transparent;
35+
--#{$prefix}gradient: var(--#{$prefix}start-color), var(--#{$prefix}end-color, rgba(0, 0, 0, 0));
36+
}
37+
38+
// For color values
3139
@each $color, $value in $colors {
3240
$end-color: rgba(0, 0, 0, 0);
3341
.start-#{$color},
@@ -37,6 +45,12 @@
3745
}
3846
}
3947

48+
.middle-transparent,
49+
.middle-transparent-hover:hover {
50+
--#{$prefix}middle-color: transparent;
51+
--#{$prefix}gradient: var(--#{$prefix}start-color), var(--#{$prefix}middle-color), var(--#{$prefix}end-color, rgba(0, 0, 0, 0));
52+
}
53+
4054
@each $color, $value in $colors {
4155
$end-color: rgba($value, 0);
4256
.middle-#{$color},
@@ -46,6 +60,11 @@
4660
}
4761
}
4862

63+
.end-transparent,
64+
.end-transparent-hover:hover {
65+
--#{$prefix}end-color: transparent;
66+
}
67+
4968
@each $color, $value in $colors {
5069
.end-#{$color},
5170
.end-#{$color}-hover:hover {

0 commit comments

Comments
 (0)