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.
2 parents 0040156 + 52a86b3 commit bc6f839Copy full SHA for bc6f839
1 file changed
Gradient.types.ps1xml
@@ -27,7 +27,32 @@
27
Stringifies the gradient
28
.DESCRIPTION
29
Gets the gradient as a string. By default, returns the CSS gradient.
30
+
31
+ If any arguments are passed and are properties of this object,
32
+ they will be returned as strings.
33
+.EXAMPLE
34
+ "$(gradient '#4488ff' '#224488')"
35
36
+ (gradient '#4488ff' '#224488').ToString("html")
37
#>
38
+param()
39
40
+if ($args) {
41
+ $anymatching = @(foreach ($arg in $args) {
42
+ $thisArg = $this.$arg
43
+ if ($thisArg) {
44
+ if ($thisArg -is [xml]) {
45
+ $thisArg.Outerxml
46
+ } else {
47
+ $thisArg
48
+ }
49
50
+ })
51
+ if ($anymatching) {
52
+ return ($anymatching -as 'string[]' -join [Environment]::NewLine)
53
54
+}
55
56
return "$($this.CSS)"
57
</Script>
58
</ScriptMethod>
0 commit comments