Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.1 KB

File metadata and controls

26 lines (19 loc) · 1.1 KB

Display

Display mode enumeration

Controls the layout algorithm type for an element. This corresponds to the CSS display property and determines how an element and its children are laid out.

Example

import { Style, Display } from "taffy-layout";

const style = new Style();
style.display = Display.Flex; // Enable flexbox layout
style.display = Display.Grid; // Enable grid layout
style.display = Display.None; // Hide element from layout

Enumeration Members

Enumeration Member Value Description
Block 0 Block-level layout where element takes the full available width
Flex 1 Flexbox layout for one-dimensional item arrangement
Grid 2 CSS Grid layout for two-dimensional item arrangement
None 3 Element is removed from layout calculation entirely