From 197f355729e804ed2b9ced4bcf40d86f775924d2 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Thu, 7 Dec 2023 01:17:18 -0500 Subject: [PATCH] Add `row-reverse` and `col-reverse` to styled --- crates/gpui2/src/styled.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/gpui2/src/styled.rs b/crates/gpui2/src/styled.rs index 346c1a760d6a56105440bfd2a3a788497d103a66..209169a9a6ecf0d4b70c8c40af3e59b6722ff9de 100644 --- a/crates/gpui2/src/styled.rs +++ b/crates/gpui2/src/styled.rs @@ -245,6 +245,13 @@ pub trait Styled: Sized { self } + /// Sets the flex direction of the element to `column-reverse`. + /// [Docs](https://tailwindcss.com/docs/flex-direction#column-reverse) + fn flex_col_reverse(mut self) -> Self { + self.style().flex_direction = Some(FlexDirection::ColumnReverse); + self + } + /// Sets the flex direction of the element to `row`. /// [Docs](https://tailwindcss.com/docs/flex-direction#row) fn flex_row(mut self) -> Self { @@ -252,6 +259,13 @@ pub trait Styled: Sized { self } + /// Sets the flex direction of the element to `row-reverse`. + /// [Docs](https://tailwindcss.com/docs/flex-direction#row-reverse) + fn flex_row_reverse(mut self) -> Self { + self.style().flex_direction = Some(FlexDirection::RowReverse); + self + } + /// Sets the element to allow a flex item to grow and shrink as needed, ignoring its initial size. /// [Docs](https://tailwindcss.com/docs/flex#flex-1) fn flex_1(mut self) -> Self {