Search Issue Tracker
By Design
Votes
0
Found in
2022.3.19f1
2023.2.9f1
2023.3.0b6
Issue ID
UUM-62832
Regression
No
UI Toolkit Visual Element overflows when the margin value is added
Reproduction steps:
1. Open the attached “UI Builder” Project
2. Open “UI Builder” Window (Window > UI Toolkit > UI Builder)
3. Select the “#root” element in the Hierarchy
4. Observe the Left and the Right margins
Expected result: The Right margin behaves like the Left one and remains inside the “#root” element
Actual result: The Right margin is created outside of the elements' border and the Left margin pushes out the Right margin, causing it to overflow
Reproducible with: 2021.3.34f1, 2022.3.19f1, 2023.2.9f1, 2023.3.0b6
Reproducible on: Windows 11
Not reproducible on: no other environment tested
-
omar_othman
Feb 19, 2024 13:49
Hi, i'm talking about margin and not flex(row or column),
Create Visual element and then give it 100% width and hight, then try to margin it from left and right side
thank you,
Omar Othman
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
- Unity Events added to a ScriptableObject are not invoked if they are added in Edit mode and their Call State is set to "Runtime Only"
- The Visual Effect GPU Event is forced into sleep until another Event is sent when the visual effect consists of two particle systems that communicate with Trigger Event set to On Die
- Nativeplugin Vulkan image gets deleted while in use and AccessTexture returns an invalid texture causing a crash or corruption when QualitySettings.anisotropicFiltering is called
- Error "DllNotFoundException: __Internal assembly:<unknown assembly> type:<unknown type> member:(null)" when attaching a managed debugger for the build of a specific project with Mono Scripting Backend
- Unable to select UI Toolkit Foldout element when using a gamepad controller
Resolution Note:
The element does not overflow (ie. it matches the CSS example) if `flex-direction: row;` is added to the parent element.
In CSS, the default value for `flex-direction` is `row`, but in Unity, the default value is `column`. This explains the initial discrepancy between CSS and Unity.