From b4bc9e4a11501cca80255b0cebeb3ce19ac34f78 Mon Sep 17 00:00:00 2001 From: cevans-uk <35352396+cevans-uk@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:22:24 +0000 Subject: [PATCH] bevy_ui: fix doc formatting for some Style fields (#9295) The previous formatting didn't render as you'd expect, with 'For CSS Grid containers' getting adopted by the prior bullet point. Rather than fixing that directly I opted for a slight reformatting for consistency with other fields, notably left/right/top/bottom. --- crates/bevy_ui/src/ui_node.rs | 36 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index 7a41270eeb0e6..9580bd8002258 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -390,58 +390,46 @@ pub struct Style { /// pub aspect_ratio: Option, - /// For Flexbox containers: - /// - Sets default cross-axis alignment of the child items. - /// For CSS Grid containers: - /// - Controls block (vertical) axis alignment of children of this grid container within their grid areas + /// - For Flexbox containers, sets default cross-axis alignment of the child items. + /// - For CSS Grid containers, controls block (vertical) axis alignment of children of this grid container within their grid areas. /// /// This value is overridden [`JustifySelf`] on the child node is set. /// /// pub align_items: AlignItems, - /// For Flexbox containers: - /// - This property has no effect. See `justify_content` for main-axis alignment of flex items. - /// For CSS Grid containers: - /// - Sets default inline (horizontal) axis alignment of child items within their grid areas + /// - For Flexbox containers, this property has no effect. See `justify_content` for main-axis alignment of flex items. + /// - For CSS Grid containers, sets default inline (horizontal) axis alignment of child items within their grid areas. /// /// This value is overridden [`JustifySelf`] on the child node is set. /// /// pub justify_items: JustifyItems, - /// For Flexbox items: - /// - Controls cross-axis alignment of the item. - /// For CSS Grid items: - /// - Controls block (vertical) axis alignment of a grid item within it's grid area + /// - For Flexbox items, controls cross-axis alignment of the item. + /// - For CSS Grid items, controls block (vertical) axis alignment of a grid item within it's grid area. /// /// If set to `Auto`, alignment is inherited from the value of [`AlignItems`] set on the parent node. /// /// pub align_self: AlignSelf, - /// For Flexbox items: - /// - This property has no effect. See `justify_content` for main-axis alignment of flex items. - /// For CSS Grid items: - /// - Controls inline (horizontal) axis alignment of a grid item within it's grid area. + /// - For Flexbox items, this property has no effect. See `justify_content` for main-axis alignment of flex items. + /// - For CSS Grid items, controls inline (horizontal) axis alignment of a grid item within it's grid area. /// /// If set to `Auto`, alignment is inherited from the value of [`JustifyItems`] set on the parent node. /// /// pub justify_self: JustifySelf, - /// For Flexbox containers: - /// - Controls alignment of lines if flex_wrap is set to [`FlexWrap::Wrap`] and there are multiple lines of items - /// For CSS Grid container: - /// - Controls alignment of grid rows + /// - For Flexbox containers, controls alignment of lines if flex_wrap is set to [`FlexWrap::Wrap`] and there are multiple lines of items. + /// - For CSS Grid containers, controls alignment of grid rows. /// /// pub align_content: AlignContent, - /// For Flexbox containers: - /// - Controls alignment of items in the main axis - /// For CSS Grid containers: - /// - Controls alignment of grid columns + /// - For Flexbox containers, controls alignment of items in the main axis. + /// - For CSS Grid containers, controls alignment of grid columns. /// /// pub justify_content: JustifyContent,