bevy/crates/bevy_ui/src
ickshonpe 36320762f4 change the default width and height of Size to Val::Auto (#7475)
# Objective

In CSS Flexbox width and height are auto by default, whereas in Bevy their default is `Size::Undefined`.
This means that, unlike in CSS, if you elide a height or width value for a node it will be given zero length (unless it has an explicitly sized child node). This has misled users into falsely assuming that they have to explicitly set a value for both height and width all the time.

relevant issue: #7120

## Solution

Change the `Size` `width` and `height` default values to `Val::Auto`

## Changelog

* Changed the `Size` `width` and `height` default values to `Val::Auto`

## Migration Guide

The default values for `Size` `width` and `height` have been changed from `Val::Undefined` to `Val::Auto`.
It's unlikely to cause any issues with existing code.
2023-02-03 01:35:06 +00:00
..
flex fix upsert_leaf not setting a MeasureFunc for new leaf nodes (#7351) 2023-01-24 16:09:52 +00:00
render Rename the background_color of 'ExtractedUiNode to color` (#7452) 2023-02-01 00:24:25 +00:00
widget Remove QueuedText (#7414) 2023-01-31 18:42:22 +00:00
camera_config.rs Extract component derive (#7399) 2023-01-30 18:12:16 +00:00
focus.rs expose cursor position with scale (#7297) 2023-01-20 14:25:24 +00:00
geometry.rs change the default width and height of Size to Val::Auto (#7475) 2023-02-03 01:35:06 +00:00
lib.rs Remove ImageMode (#6674) 2022-11-18 21:16:32 +00:00
node_bundles.rs Change default FocusPolicy to Pass (#7161) 2023-01-12 17:15:20 +00:00
stack.rs Add z-index support with a predictable UI stack (#5877) 2022-11-02 22:06:04 +00:00
ui_node.rs Fix various typos (#7096) 2023-01-06 00:43:30 +00:00
update.rs Add z-index support with a predictable UI stack (#5877) 2022-11-02 22:06:04 +00:00