Search Issue Tracker

By Design

Votes

0

Found in

6000.0.53f1

6000.1.11f1

6000.2.0b9

6000.3.0a1

Issue ID

UUM-111101

Regression

No

Styles are applied when the tab view has the different style class set in UI Debugger

-

Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Observe the objects with the text “Tab“ in the Game view
4. Open the “/Assets/UI/JournalStyles.uss“
5. Change the line with “background-color: rgba(255, 188, 188, 255);“ to “background-color: rgba(20, 188, 188, 255);“
6. Right-click in the Project window and click “Refresh”
7. Repeat step 3

Expected result: Objects remain the same
Actual result: Objects change color

Reproducible with: 6000.0.53f1, 6000.1.11f1, 6000.2.0b9, 6000.3.0a1
Could not test with: 2022.3.62f1 (Element 'UnityEngine.UIElements.TabView' has no registered factory method.
UnityEditor.EditorApplication:Internal_RestoreLastOpenedScenes ())

Reproducible on:
Play Mode
Windows Standalone Player

Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

  1. Resolution Note:

    The reason that both ".anya-tab-view-journal .unity-tab__header" and ".ayna-tab-view-inventory .unity-tab__header" match in this case is because the relationship between the first and second part is set to any children.

    To target the headers for only the journal or only the inventory, you need to use more specific selectors, such as:
    ".ayna-tab-view-journal > .unity-tab-view__content-viewport .unity-tab__header"
    ".ayna-tab-view-inventory > .unity-tab-view__content-viewport .unity-tab__header"

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.