<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar" -->

---
title: UI Toolkit: Themes and USS variables | daily.dev
description: A walkthrough of building a scalable theme system in Unity&#x27;s UI Toolkit using USS (Unity Style Sheets) variables. The approach separates structure (UXML) from...
canonical: https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: UI Toolkit: Themes and USS variables | daily.dev
og:description: A walkthrough of building a scalable theme system in Unity&#x27;s UI Toolkit using USS (Unity Style Sheets) variables. The approach separates structure (UXML) from...
og:url: https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar
og:image: https://api.daily.dev/og/posts/EfPmSWgAr.png
og:image:alt: UI Toolkit: Themes and USS variables
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# UI Toolkit: Themes and USS variables

**[Unity](https://daily.dev/sources/unity)** · 8 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of building a scalable theme system in Unity's UI Toolkit using USS (Unity Style Sheets) variables. The approach separates structure (UXML) from styling, defines reusable USS variables in a shared style sheet, and creates separate light/dark theme style sheets that assign values to those variables. A small C# controller script swaps the active theme style sheet at runtime, causing UI Toolkit to automatically recalculate and update all dependent styles. The guide also covers reading USS variables from C# using the custom style API, and briefly introduces Theme Style Sheets (TSS) for panel-level theming in larger projects.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=NpvlWHlXnIo>

## Similar posts on daily.dev

- [Hands-On UI Toolkit Tutorials For Unity Devs](https://daily.dev/posts/hands-on-ui-toolkit-tutorials-for-unity-devs-uiybcyb9o) · 80 LEVEL · 0 upvotes · 0 comments
- [No-Hassle Visual Studio Code Theming: Building an Extension](https://daily.dev/posts/no-hassle-visual-studio-code-theming-building-an-extension-wyiwzoyp3) · CSS-Tricks · 2 upvotes · 0 comments

---

Tags: [#c#](https://daily.dev/tags/c#), [#unity](https://daily.dev/tags/unity)

[View this post on daily.dev](https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"UI Toolkit: Themes and USS variables","url":"https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar"},"datePublished":"2026-06-09T14:12:36.330Z","dateModified":"2026-06-09T14:12:54.086Z","description":"A walkthrough of building a scalable theme system in Unity's UI Toolkit using USS (Unity Style Sheets) variables. The approach separates structure (UXML) from...","image":"https://i.ytimg.com/vi/NpvlWHlXnIo/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/NpvlWHlXnIo/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Unity","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Unity","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/9afe038cc27e4d95ad581284cea8578d","url":"https://daily.dev/sources/unity"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ui-toolkit-themes-and-uss-variables-efpmswgar","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c#,unity","timeRequired":"PT8M","video":{"@type":"VideoObject","name":"UI Toolkit: Themes and USS variables","description":"A walkthrough of building a scalable theme system in Unity's UI Toolkit using USS (Unity Style Sheets) variables. The approach separates structure (UXML) from...","thumbnailUrl":"https://i.ytimg.com/vi/NpvlWHlXnIo/sddefault.jpg","uploadDate":"2026-06-09T14:12:36.330Z","duration":"PT8M","url":"https://api.daily.dev/r/EfPmSWgAr","embedUrl":"https://www.youtube.com/embed/NpvlWHlXnIo"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Unity","item":"https://daily.dev/sources/unity"},{"@type":"ListItem","position":3,"name":"UI Toolkit: Themes and USS variables"}]}
```

