Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Document how padding and margin behave with percentage values #7785

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/bevy_ui/src/ui_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ pub struct Style {
pub position: UiRect,
/// The margin of the node
pub margin: UiRect,
/// The padding of the node
/// The space between the edges of the node and its contents
///
/// If a percentage value is used, the percentage is calculated based on the width of the parent node.
pub padding: UiRect,
/// The border of the node
pub border: UiRect,
Expand Down