Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
Issue ID
1335507
Regression
No
Runtime theme's text color and font-size cannot be overridden from user stylesheets using :root selector
User cannot change the text color and the font size of UI elements using the ":root" or "VisualElement" selector.
Steps:
1 - From the project browser, add a new PanelSettings asset
2 - Open the builder
3 - Create a new document
4 - Select "Unity Default Runtime Theme" in the Theme dropdown of the Viewport Toolbar
5 - Add some controls to the document: button, label, text field, slider (with label), progress bar, dropdown.
6 - Add a new USS to the document from the StyleSheets pane
7 - Add the ":root" selector to it and select it
8 - In the Inspector, changes the text and font-size
9 - Save the document
10 - In the Scene Hierarchy add a new UI document
11 - Play/Start Game mode to see the UI in the Game view
Actual outcome:
The text color and font-size are controls do not match the specified values for the :root selector neither in the UI Builder nor the Game view
Expected outcome:
The text color and font-size are controls match the specified values for the :root selector in the UI Builder and the Game view
Jira issue: https://jira.unity3d.com/browse/UIT-1359
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Manual reference page for Grid Selection is missing
- Awaitable.NextFrameAsync causes GC Alloc 0.7 KB when using CancellationToken
- Prefab "Overrides" list item popups are overridden when navigating with keyboard arrow keys
- Alpha Tolerance setting does not affect generated outlines when generating Custom Physics Shape in the Sprite Editor
- The information/help message section misses a margin in the "Profiler" window
Add comment