mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-19 02:17:35 +03:00
Rename overflow_hidden_{x,y}
to overflow_{x,y}_hidden
(#4146)
This PR renames the `overflow_hidden_x` and `overflow_hidden_y` methods to `overflow_x_hidden` and `overflow_y_hidden`, respectively. This provides consistency with our `overflow_x_scroll` / `overflow_y_scroll` methods, as well as better matches Tailwind's naming. Release Notes: - N/A
This commit is contained in:
parent
9993418f58
commit
decf320a74
@ -66,18 +66,24 @@ pub trait Styled: Sized {
|
|||||||
self
|
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 {
|
fn overflow_hidden(mut self) -> Self {
|
||||||
self.style().overflow.x = Some(Overflow::Hidden);
|
self.style().overflow.x = Some(Overflow::Hidden);
|
||||||
self.style().overflow.y = Some(Overflow::Hidden);
|
self.style().overflow.y = Some(Overflow::Hidden);
|
||||||
self
|
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.style().overflow.x = Some(Overflow::Hidden);
|
||||||
self
|
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.style().overflow.y = Some(Overflow::Hidden);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ impl RenderOnce for StoryContainer {
|
|||||||
.h_px()
|
.h_px()
|
||||||
.flex_1()
|
.flex_1()
|
||||||
.id("story_body")
|
.id("story_body")
|
||||||
.overflow_hidden_x()
|
.overflow_x_hidden()
|
||||||
.overflow_y_scroll()
|
.overflow_y_scroll()
|
||||||
.flex()
|
.flex()
|
||||||
.flex_col()
|
.flex_col()
|
||||||
|
@ -117,7 +117,7 @@ impl RenderOnce for TabBar {
|
|||||||
.relative()
|
.relative()
|
||||||
.flex_1()
|
.flex_1()
|
||||||
.h_full()
|
.h_full()
|
||||||
.overflow_hidden_x()
|
.overflow_x_hidden()
|
||||||
.child(
|
.child(
|
||||||
div()
|
div()
|
||||||
.absolute()
|
.absolute()
|
||||||
|
@ -51,7 +51,7 @@ impl StatusBar {
|
|||||||
fn render_left_tools(&self, _: &mut ViewContext<Self>) -> impl IntoElement {
|
fn render_left_tools(&self, _: &mut ViewContext<Self>) -> impl IntoElement {
|
||||||
h_flex()
|
h_flex()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.overflow_hidden_x()
|
.overflow_x_hidden()
|
||||||
.children(self.left_items.iter().map(|item| item.to_any()))
|
.children(self.left_items.iter().map(|item| item.to_any()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user