File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010param ()
1111# Get our gradient type
1212$gradientTypes = $this.GradientTypes
13+
14+ $gradientStack = @ ()
15+
1316$gradientValues = @ (foreach ($in in $this.input ) {
17+ if ($in.pstypenames -eq ' gradient' ) {
18+ $gradientStack += $in
19+ continue
20+ }
1421 if ($in -notmatch $this.GradientTypePattern ) {
1522 $in
1623 }
1724})
1825
19- if (-not $gradientTypes ) { $gradientTypes = ' radial-gradient' }
20- @ (foreach ($gradientType in $gradientTypes ) {
21- " $gradientType ($ (
22- @ (
23- $gradientValues
24- ) -join (' , ' + [Environment ]::NewLine + (' ' * 2 ))
25- ) )"
26- }) -join ' , '
26+ if ($gradientValues ) {
27+ if (-not $gradientTypes ) { $gradientTypes = ' radial-gradient' }
28+ $gradientCss = @ (foreach ($gradientType in $gradientTypes ) {
29+ " $gradientType ($ (
30+ [Environment ]::NewLine + (' ' * 2 ) +
31+ $ (
32+ @ (
33+ $gradientValues
34+ ) -join (' , ' + [Environment ]::NewLine + (' ' * 2 ))
35+ )
36+ ) )"
37+ }) -join ' , '
38+ }
39+ if ($gradientStack ) {
40+ $deepJoiner = (' , ' + [Environment ]::NewLine)
41+ if (-not $gradientValues ) {
42+ $gradientStack -join $deepJoiner
43+ } else {
44+ @ ($gradientStack ;$gradientCss ) -join $deepJoiner
45+ }
46+ } elseif ($gradientValues ) {
47+ $gradientCss
48+ }
49+
You can’t perform that action at this time.
0 commit comments