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
- [WebGPU] error with compute shader and read-only RWTexture
- Capacity-size memory is copied instead of Length-size when using UnsafeUtility.memCpy()
- Console displays "SerializedObjectNotCreatableException: Object at index 0 is null" error during Unity theme change while "Tile Palette" window is opened
- Details are not shown when Error Message is still selected after changing Log Entry Count in the Console
- Disabling Unity VCS in Project Settings unfocuses the Project Settings Window
Add comment