Description: When styling UI within the Inspector in UI Builder and changing a property with multiple child properties (e.g. Border Width), the USS generated defines the value of each child property instead of using the shorthand that affects all the child properties automatically.
Steps to reproduce:
- Open a URP Unity project
- Open the UI Builder via Window > UI Toolkit > UI Builder
- Ensure the UXML Preview pane at the bottom is visible by expanding it
- Create a Visual Element by dragging it from the Library to the Hierarchy
- Make sure the Visual Element is selected and its details are visible in the Inspector
- Find the Width option under Inlined Styles > Border
- Change Width to 2px
Actual results: In the UXML preview, the generated USS has added all four width edges separately with their values set to 2px instead of doing the shorthand and much more readable 'border-radius: 2px;'
Expected results:
Reproducible with versions: 6000.0.13f1, 2022.3.39f1, 2021.3.40f1
Not reproducible with versions: -
Can’t test with versions: -
Tested on (OS): Windows 10, Windows 11
Notes:
- Affects when styling both inline styles or USS selectors