mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 19:05:08 +03:00
Add items_baseline
to Styled
(#14238)
Add support for aligning items to the baseline. Release Notes: - N/A --------- Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
This commit is contained in:
parent
cd4847ca22
commit
c18e9aedcd
@ -190,18 +190,10 @@ pub trait Styled: Sized {
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to justify flex items along the container's main axis
|
||||
/// such that there is an equal amount of space between each item.
|
||||
/// [Docs](https://tailwindcss.com/docs/justify-content#space-between)
|
||||
fn justify_between(mut self) -> Self {
|
||||
self.style().justify_content = Some(JustifyContent::SpaceBetween);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to justify flex items along the center of the container's main axis.
|
||||
/// [Docs](https://tailwindcss.com/docs/justify-content#center)
|
||||
fn justify_center(mut self) -> Self {
|
||||
self.style().justify_content = Some(JustifyContent::Center);
|
||||
/// Sets the element to align flex items along the baseline of the container's cross axis.
|
||||
/// [Docs](https://tailwindcss.com/docs/align-items#baseline)
|
||||
fn items_baseline(mut self) -> Self {
|
||||
self.style().align_items = Some(AlignItems::Baseline);
|
||||
self
|
||||
}
|
||||
|
||||
@ -219,6 +211,21 @@ pub trait Styled: Sized {
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to justify flex items along the center of the container's main axis.
|
||||
/// [Docs](https://tailwindcss.com/docs/justify-content#center)
|
||||
fn justify_center(mut self) -> Self {
|
||||
self.style().justify_content = Some(JustifyContent::Center);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to justify flex items along the container's main axis
|
||||
/// such that there is an equal amount of space between each item.
|
||||
/// [Docs](https://tailwindcss.com/docs/justify-content#space-between)
|
||||
fn justify_between(mut self) -> Self {
|
||||
self.style().justify_content = Some(JustifyContent::SpaceBetween);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the element to justify items along the container's main axis such
|
||||
/// that there is an equal amount of space on each side of each item.
|
||||
/// [Docs](https://tailwindcss.com/docs/justify-content#space-around)
|
||||
|
Loading…
Reference in New Issue
Block a user