Skip to content

Commit 0cfd5dd

Browse files
feat: Gradient.html ( Fixes #22 )
1 parent 2d70824 commit 0cfd5dd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Types/Gradient/get_HTML.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<#
2+
.SYNOPSIS
3+
Gets the gradient as HTML
4+
.DESCRIPTION
5+
Gets the gradient as a `<div>` element with a style attribute.
6+
#>
7+
$styleAttribute = [Web.HttpUtility]::HtmlAttributeEncode(@(
8+
"width:100%"
9+
"height:100%"
10+
"background-image:$($this.CSS)"
11+
) -join ';')
12+
"<div style='$styleAttribute'></div>"

0 commit comments

Comments
 (0)