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

  1. Resolution Note:

    Unfortunately, the UI Builder doesn't currently support shorthand.

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.