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
- [Quest] Pitch Shifter causes audio degradation on Quest 2 devices when sped up
- "GUI Error: Invalid GUILayout" and "NullReferenceException" are thrown when adding Scenes to "Scenes in Baking Set" in Adaptive Probe Volumes
- Inspector window not updating when switching GameObjects in Play Mode while having a VR headset connected
- "UnityException: GetName can only be called from the main thread." erors are thrown when the Shortcuts window is opened and entering Play Mode with a shortcut
- [Android] Light2D visuals stacking over frames when using RenderGraph
Add comment