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
- Lightmaps are baked incorrectly for GameObjects when their Position is <=-2048 or >=2048 on any of the coordinates
- Sahder errors in Player when "Strict shader variant matching" is enabled and the rendering path is set to "Deferred"
- NullReferenceExceptions are being thrown when saving a ScriptableObject with an array of a type with a CustomPropertyDrawer that uses TrackPropertyValue
- Applied velocity is inconsistent when using Rigidbody AddForce() with ForceMode.VelocityChange
- Crash on AudioUtil_CUSTOM_HasAudioCallback when exiting Play Mode while the Inspector is displaying a GameObject with an empty script attached
Add comment