pub enum ContainerQuery {
InlineSize(ContainerSize),
BlockSize(ContainerSize),
Width(ContainerSize),
Height(ContainerSize),
AspectRatio(ContainerAspectRatio),
Orientation(ContainerOrientation),
}
Expand description
Container query types
Variants§
InlineSize(ContainerSize)
@container (inline-size > 768px)
BlockSize(ContainerSize)
@container (block-size > 768px)
Width(ContainerSize)
@container (width > 768px)
Height(ContainerSize)
@container (height > 768px)
AspectRatio(ContainerAspectRatio)
@container (aspect-ratio > 16/9)
Orientation(ContainerOrientation)
@container (orientation: landscape)
Implementations§
Source§impl ContainerQuery
impl ContainerQuery
Sourcepub fn inline_size(size: ContainerSize) -> Self
pub fn inline_size(size: ContainerSize) -> Self
Create a new inline-size container query
Sourcepub fn block_size(size: ContainerSize) -> Self
pub fn block_size(size: ContainerSize) -> Self
Create a new block-size container query
Sourcepub fn width(size: ContainerSize) -> Self
pub fn width(size: ContainerSize) -> Self
Create a new width container query
Sourcepub fn height(size: ContainerSize) -> Self
pub fn height(size: ContainerSize) -> Self
Create a new height container query
Sourcepub fn aspect_ratio(ratio: ContainerAspectRatio) -> Self
pub fn aspect_ratio(ratio: ContainerAspectRatio) -> Self
Create a new aspect-ratio container query
Sourcepub fn orientation(orientation: ContainerOrientation) -> Self
pub fn orientation(orientation: ContainerOrientation) -> Self
Create a new orientation container query
Sourcepub fn to_css_query(&self) -> String
pub fn to_css_query(&self) -> String
Convert to CSS @container query
Sourcepub fn to_class_name(&self) -> String
pub fn to_class_name(&self) -> String
Convert to class name
Trait Implementations§
Source§impl Clone for ContainerQuery
impl Clone for ContainerQuery
Source§fn clone(&self) -> ContainerQuery
fn clone(&self) -> ContainerQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ContainerQuery
impl Debug for ContainerQuery
Source§impl<'de> Deserialize<'de> for ContainerQuery
impl<'de> Deserialize<'de> for ContainerQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ContainerQuery
impl Display for ContainerQuery
Source§impl Hash for ContainerQuery
impl Hash for ContainerQuery
Source§impl PartialEq for ContainerQuery
impl PartialEq for ContainerQuery
Source§impl Serialize for ContainerQuery
impl Serialize for ContainerQuery
impl Eq for ContainerQuery
impl StructuralPartialEq for ContainerQuery
Auto Trait Implementations§
impl Freeze for ContainerQuery
impl RefUnwindSafe for ContainerQuery
impl Send for ContainerQuery
impl Sync for ContainerQuery
impl Unpin for ContainerQuery
impl UnwindSafe for ContainerQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.