Merge branch 'main' into taffy
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
commit
740b105330
41 changed files with 536 additions and 113 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::{
|
||||
adapter::Adapter,
|
||||
style::{DefinedLength, Display, Overflow, Position, Style},
|
||||
style::{DefinedLength, Display, Fill, Overflow, Position, Style},
|
||||
};
|
||||
use anyhow::Result;
|
||||
use derive_more::{Deref, DerefMut};
|
||||
|
@ -193,7 +193,7 @@ pub trait Element<V: 'static>: 'static + Clone {
|
|||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.style_mut().size.width = length;
|
||||
self.style_mut().min_size.width = length;
|
||||
self
|
||||
}
|
||||
|
||||
|
@ -205,6 +205,23 @@ pub trait Element<V: 'static>: 'static + Clone {
|
|||
self.style_mut().size.height = length;
|
||||
self
|
||||
}
|
||||
|
||||
#[tailwind_lengths]
|
||||
fn min_h(mut self, length: DefinedLength) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.style_mut().min_size.height = length;
|
||||
self
|
||||
}
|
||||
|
||||
fn fill(mut self, fill: impl Into<Fill>) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.style_mut().fill = fill.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
pub trait ElementObject<V> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue