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§

source

type GridContainerStyle<'a>: GridContainerStyle where Self: 'a

The style type representing the CSS Grid container’s styles

source

type GridItemStyle<'a>: GridItemStyle where Self: 'a

The style type representing each CSS Grid item’s styles

Required Methods§

source

fn get_grid_container_style( &self, node_id: NodeId, ) -> Self::GridContainerStyle<'_>

Get the container’s styles

source

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.

Implementors§