diff --git a/crates/gpui/src/styled.rs b/crates/gpui/src/styled.rs index 0eba1771f52d47bde32f465a887e52547f3a89b2..508dca958349a9cb52ad69df70c5c8f2b570ba88 100644 --- a/crates/gpui/src/styled.rs +++ b/crates/gpui/src/styled.rs @@ -66,18 +66,24 @@ pub trait Styled: Sized { self } + /// Sets the behavior of content that overflows the container to be hidden. + /// [Docs](https://tailwindcss.com/docs/overflow#hiding-content-that-overflows) fn overflow_hidden(mut self) -> Self { self.style().overflow.x = Some(Overflow::Hidden); self.style().overflow.y = Some(Overflow::Hidden); self } - fn overflow_hidden_x(mut self) -> Self { + /// Sets the behavior of content that overflows the container on the X axis to be hidden. + /// [Docs](https://tailwindcss.com/docs/overflow#hiding-content-that-overflows) + fn overflow_x_hidden(mut self) -> Self { self.style().overflow.x = Some(Overflow::Hidden); self } - fn overflow_hidden_y(mut self) -> Self { + /// Sets the behavior of content that overflows the container on the Y axis to be hidden. + /// [Docs](https://tailwindcss.com/docs/overflow#hiding-content-that-overflows) + fn overflow_y_hidden(mut self) -> Self { self.style().overflow.y = Some(Overflow::Hidden); self } diff --git a/crates/story/src/story.rs b/crates/story/src/story.rs index f5448831cb168c240d4e8d8c038cd3f02a0bd2dd..47bdab7f239643ae9e6fd2ebf2366c80ed8555f4 100644 --- a/crates/story/src/story.rs +++ b/crates/story/src/story.rs @@ -104,7 +104,7 @@ impl RenderOnce for StoryContainer { .h_px() .flex_1() .id("story_body") - .overflow_hidden_x() + .overflow_x_hidden() .overflow_y_scroll() .flex() .flex_col() diff --git a/crates/ui/src/components/tab_bar.rs b/crates/ui/src/components/tab_bar.rs index adee8389e47a8db3f343e01cc9d81a9c1d08ead4..4b61d90bcdffc573d9c8940d5173e051f09b812e 100644 --- a/crates/ui/src/components/tab_bar.rs +++ b/crates/ui/src/components/tab_bar.rs @@ -117,7 +117,7 @@ impl RenderOnce for TabBar { .relative() .flex_1() .h_full() - .overflow_hidden_x() + .overflow_x_hidden() .child( div() .absolute() diff --git a/crates/workspace/src/status_bar.rs b/crates/workspace/src/status_bar.rs index f6fe91a574edc74471673b545a1bcf7015421933..f575feef7ed8046bd661c0f33d8d4e107a6dd058 100644 --- a/crates/workspace/src/status_bar.rs +++ b/crates/workspace/src/status_bar.rs @@ -51,7 +51,7 @@ impl StatusBar { fn render_left_tools(&self, _: &mut ViewContext) -> impl IntoElement { h_flex() .gap_2() - .overflow_hidden_x() + .overflow_x_hidden() .children(self.left_items.iter().map(|item| item.to_any())) }