Trait taffy::tree::traits::LayoutGridContainer
source · pub trait LayoutGridContainer: LayoutPartialTree {
type GridContainerStyle<'a>: GridContainerStyle
where Self: 'a;
type GridItemStyle<'a>: GridItemStyle
where Self: 'a;
// Required methods
fn get_grid_container_style(
&self,
node_id: NodeId,
) -> Self::GridContainerStyle<'_>;
fn get_grid_child_style(
&self,
child_node_id: NodeId,
) -> Self::GridItemStyle<'_>;
}
Expand description
Extends LayoutPartialTree
with getters for the styles required for CSS Grid layout
Required Associated Types§
sourcetype GridContainerStyle<'a>: GridContainerStyle
where
Self: 'a
type GridContainerStyle<'a>: GridContainerStyle where Self: 'a
The style type representing the CSS Grid container’s styles
sourcetype GridItemStyle<'a>: GridItemStyle
where
Self: 'a
type GridItemStyle<'a>: GridItemStyle where Self: 'a
The style type representing each CSS Grid item’s styles
Required Methods§
sourcefn get_grid_container_style(
&self,
node_id: NodeId,
) -> Self::GridContainerStyle<'_>
fn get_grid_container_style( &self, node_id: NodeId, ) -> Self::GridContainerStyle<'_>
Get the container’s styles
sourcefn get_grid_child_style(&self, child_node_id: NodeId) -> Self::GridItemStyle<'_>
fn get_grid_child_style(&self, child_node_id: NodeId) -> Self::GridItemStyle<'_>
Get the child’s styles
Object Safety§
This trait is not object safe.