> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/apps/themes/cascading-style-sheets.md).

# Cascading Style Sheets

Add custom CSS stylesheets to PowerShell Universal dashboards through published folders and the Stylesheets parameter to override Material UI classes.

You can use a cascading style sheet (CSS) by add a `.css` file to a published folder and then passing it to the `-Stylesheets` parameter for `New-UDDashboard`.

For example, the `dashboard.ps1` file would look like this.

```powershell
New-UDDashboard -Title "Server Monitor" -Content {

} -Stylesheets @("/assets/theme.css")
```

You could then setup a published folder to provide the assets route. This is what the contents of `publishedFolders.ps1` will look like.

```powershell
New-PSUPublishedFolder -RequestPath "/assets" -Path "C:\assets"
```

Within the `C:\assets` folder, you can place any assets you'd like to access on the `/assets` route.

You can then create a style sheet to manipulate whatever portion of the dashboard you'd like.

```css
.ud-dashboard > div {
    background-image: url("/assets/image.jpeg");
}
```

This produces a dashboard with a background image of Austin the dog sleeping in a pile of dirt.

## Determining the Correct Class Names

Every Material UI component has a series of global class names that you can use to apply styles throughout your dashboard. To determine the correct class names, you can view the a particular component's API documentation. There is a list of the global class names that apply to that component.

For example, here is the [CSS documentation for the Alert component](https://material-ui.com/api/alert/#css).

Within your CSS file, you can use these class names to override styles throughout your dashboard. If you wanted to set all success alerts to have a red background, you could create a CSS file like this.

```css
.MuiAlert-standardSuccess { background-color: red !important;  }
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/powershell-universal/apps/themes/cascading-style-sheets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
