We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e60adc2 commit ac6a3f5Copy full SHA for ac6a3f5
1 file changed
Types/Gradient/get_CSS.ps1
@@ -0,0 +1,26 @@
1
+<#
2
+.SYNOPSIS
3
+ Gets Gradient CSS
4
+.DESCRIPTION
5
+ Gets the Gradient as CSS.
6
+.EXAMPLE
7
+ gradient '#4488ff', '#224488' |
8
+ Select-Object -Expand CSS
9
+#>
10
+param()
11
+# Get our gradient type
12
+$gradientTypes = $this.GradientTypes
13
+$gradientValues = @(foreach ($in in $this.input) {
14
+ if ($in -notmatch $this.GradientTypePattern) {
15
+ $in
16
+ }
17
+})
18
+
19
+if (-not $gradientTypes) { $gradientTypes = 'radial-gradient'}
20
+@(foreach ($gradientType in $gradientTypes) {
21
+ "$gradientType($(
22
+ @(
23
+ $gradientValues
24
+ ) -join ', '
25
+ ))"
26
+}) -join ', '
0 commit comments