#[non_exhaustive]pub enum Display {
None,
Flex,
InlineFlex,
Grid,
InlineGrid,
Inline,
Block,
InlineBlock,
}Expand description
This enum determines the layout algorithm used for the children of a node.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
The element is not displayed
Flex
The element generates a flex container and its children follow the flexbox layout algorithm
InlineFlex
The element generates an inline-level flex container
Grid
The element generates a grid container and its children follow the CSS Grid layout algorithm
InlineGrid
The element generates an inline-level grid container
Inline
The element generates an inline container and its children follow the inline layout algorithm
Block
The element creates a block container and its children follow the block layout algorithm
InlineBlock
The element generates an inline-level block container
Implementations§
Source§impl Display
impl Display
Sourcepub fn is_inline(&self) -> bool
pub fn is_inline(&self) -> bool
Returns true if the display creates an inline formatting context.
Sourcepub fn is_inline_level(&self) -> bool
pub fn is_inline_level(&self) -> bool
Returns true if the display participates in the inline flow as an atomic box.
Sourcepub fn should_blockify_children(&self) -> bool
pub fn should_blockify_children(&self) -> bool
Returns true if the display makes the children blockified (e.g., flex or grid).
Sourcepub fn as_blockified(self) -> Self
pub fn as_blockified(self) -> Self
Cast the display to block level.
Trait Implementations§
impl Copy for Display
Source§impl<'i> FromCss<'i> for Display
impl<'i> FromCss<'i> for Display
Source§const VALID_TOKENS: &'static [CssToken]
const VALID_TOKENS: &'static [CssToken]
Source§fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
fn from_css(input: &mut Parser<'i, '_>) -> ParseResult<'i, Self>
Parser instance.