Skip to content

HTML and CSS Helper Functions #119

@adamdriscoll

Description

@adamdriscoll

We should have set of HTML functions that wrap New-UDElement. For example:

New-UDDiv -Content {
   "A div!"
} 

We should then include some aliases to make it nice and terse.

div {
    a -href 'https://www.powershelluniversal.com' { "PowerShell Universal" }
}

We should also include a function for CSS styling. It would have all the valid CSS style properties and return a hashtable.

$Style = New-UDCSSStyle -BackgroundColor 'red' -Display 'flex'

This would be a good exercise for an LLM. I tried ChatGPT, but it didn't really get there. I think we could add this to the Tools module.

We could also consider making something like PowerShellUniversal.Apps.HTML

Metadata

Metadata

Assignees

No one assigned

    Labels

    appPowerShell Universal AppenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions