Skip to content

Commit 4d4f4d4

Browse files
feat: Gradient.json ( Fixes #6 )
1 parent 991bf9c commit 4d4f4d4

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Types/Gradient/get_JSON.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<#
2+
.SYNOPSIS
3+
Gets a json gradient
4+
.DESCRIPTION
5+
Gets the gradient in JavaScript Object Notation (JSON)
6+
7+
This describes the gradient as a background-image with the css inline in a string.
8+
9+
This should work seamlessly with
10+
[Element.animate](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate)
11+
to allow you to animate a gradient change.
12+
.LINK
13+
https://developer.mozilla.org/en-US/docs/Web/API/Element/animate
14+
#>
15+
@{
16+
'background-image' = "$($this.CSS)"
17+
} | ConvertTo-Json

0 commit comments

Comments
 (0)