From 02f5a514ce0b886816000ad4e51dcf50c2a1206e Mon Sep 17 00:00:00 2001 From: Paul Xu <40262910+xb284524239@users.noreply.github.com> Date: Thu, 30 Oct 2025 00:56:53 +0800 Subject: [PATCH] gpui: Add `justify_evenly` to `Styled` (#41262) Release Notes: - gpui: Add `justify_evenly()` to `Styled`. --- crates/gpui/src/styled.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/gpui/src/styled.rs b/crates/gpui/src/styled.rs index 8dcb43c6ce6bb5522b3d1337390ae5436809720e..f653f050c07848340c8da1fa0e01a2a4da985bdb 100644 --- a/crates/gpui/src/styled.rs +++ b/crates/gpui/src/styled.rs @@ -308,6 +308,16 @@ pub trait Styled: Sized { self } + /// Sets the element to justify items along the container's main axis such + /// that there is an equal amount of space around each item, but also + /// accounting for the doubling of space you would normally see between + /// each item when using justify-around. + /// [Docs](https://tailwindcss.com/docs/justify-content#space-evenly) + fn justify_evenly(mut self) -> Self { + self.style().justify_content = Some(JustifyContent::SpaceEvenly); + self + } + /// Sets the element to pack content items in their default position as if no align-content value was set. /// [Docs](https://tailwindcss.com/docs/align-content#normal) fn content_normal(mut self) -> Self {