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
- Frame Debugger is not disabled when switching Scenes if the Frame Debugger window is not open during the transition
- Standalone Profiler Targets another Project if a Standalone Profiler was launched in it before when switching between Edit or Play Mode Targets
- Crash on ForwardRenderLoopJob when opening a specific project
- [Android] Memory leak and eventual crash on Snapdragon 8 Gen 1+ devices when a Clear Pass is executed after Framebuffer Fetch
- PhysicsRaycaster ray length is incorrect when casting from rotated Camera
Add comment