mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 22:42:08 +00:00
Improve the documentation for flex-basis
(#7685)
# Objective The current doc comment for `flex-basis` states that it is "The initial size of the item", which is a bit confusing since size in Bevy is mostly used to refer to two-dimensional extents but `flex-basis` is a one-dimensional value. It also needs to explain that: * `flex-basis` sets the initial length of the main axis. * Overrides `size` on the main axis. * Obeys the `min_size` and `max_size` constraints.
This commit is contained in:
parent
8d51f4a2a5
commit
11c7e5807a
1 changed files with 3 additions and 1 deletions
|
@ -247,7 +247,9 @@ pub struct Style {
|
|||
pub flex_grow: f32,
|
||||
/// How to shrink if there's not enough space available
|
||||
pub flex_shrink: f32,
|
||||
/// The initial size of the item
|
||||
/// The initial length of the main axis, before other properties are applied.
|
||||
///
|
||||
/// If both are set, `flex_basis` overrides `size` on the main axis but it obeys the bounds defined by `min_size` and `max_size`.
|
||||
pub flex_basis: Val,
|
||||
/// The ideal size of the flexbox
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue