File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,28 @@ return $foundTypes
127127'(?:repeating-)?(?> conic|linear|radial)(?:-gradient)?$'
128128 </GetScriptBlock >
129129 </ScriptProperty >
130+ <ScriptProperty >
131+ <Name >JSON</Name >
132+ <GetScriptBlock >
133+ < #
134+ .SYNOPSIS
135+ Gets a json gradient
136+ .DESCRIPTION
137+ Gets the gradient in JavaScript Object Notation (JSON)
138+
139+ This describes the gradient as a background-image with the css inline in a string.
140+
141+ This should work seamlessly with
142+ [Element.animate](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate)
143+ to allow you to animate a gradient change.
144+ .LINK
145+ https://developer.mozilla.org/en-US/docs/Web/API/Element/animate
146+ #>
147+ @{
148+ 'background-image' = "$($this.CSS)"
149+ } | ConvertTo-Json
150+ </GetScriptBlock >
151+ </ScriptProperty >
130152 <ScriptProperty >
131153 <Name >SVG</Name >
132154 <GetScriptBlock >
You can’t perform that action at this time.
0 commit comments