Search Issue Tracker
Feature Request
Votes
0
Found in
2021.3.40f1
2022.3.39f1
6000.0.13f1
Issue ID
UUM-76954
Regression
No
Styling in UI Builder does not generate the shorthand for defining property values
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;'
!image-2024-07-29-12-01-36-548.png|width=487,height=14!
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Unfortunately, the UI Builder doesn't currently support shorthand.