Vixen
dd8b0a81
csharp
public struct LayoutStyle

Everything a node's layout depends on, as one unmanaged value.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

All nine edges are stored, including the Horizontal, Vertical and All shorthands, because CSS resolves them by precedence at read time rather than by expansion at write time: setting All and then Left is not the same document as setting Left and then All, and a store that expanded on write could not tell them apart.

This is around 400 bytes — doc 09's estimate of 120 was made before the edge shorthands and the writing-mode-relative pair were counted. A hundred thousand nodes is therefore about 40 MB in four allocations, against the reference port's several hundred thousand heap objects for the same tree, which is the comparison ADR-006 was actually making.

Fields and properties (49)

  • public static readonly LayoutStyle Default

    A style with every CSS initial value, which is not the same as all zeroes.

  • public Direction Direction

    Which way the inline axis runs.

  • public FlexDirection FlexDirection

    The main axis.

  • public Justify JustifyContent

    Main-axis distribution.

  • public Align AlignContent

    Cross-axis distribution of the lines.

  • public Align AlignItems

    Cross-axis placement of the items.

  • public Align AlignSelf

    This node's own cross-axis placement, overriding its parent's.

  • public OverflowAlignment JustifyContentOverflow

    Whether JustifyContent gives up and packs at the start on overflow.

  • public OverflowAlignment AlignContentOverflow
  • public OverflowAlignment AlignItemsOverflow
  • public OverflowAlignment AlignSelfOverflow
  • public LegacyTextAlign LegacyTextAlign

    Where this block container puts its block-level children on the inline axis.

  • public TextAlign TextAlign

    Where the items on this container's line boxes sit along the inline axis.

  • public FloatSide Float

    Which side this box floats to, or None.

  • public Clear Clear

    Which earlier floats this box refuses to sit beside.

  • public PositionType PositionType

    How this node is positioned.

  • public Wrap FlexWrap

    Whether the line wraps.

  • public Overflow OverflowX

    What happens to content that does not fit across the node.

  • public Overflow OverflowY

    What happens to content that does not fit down the node.

  • public float ScrollbarWidth

    How much room a scrollbar takes out of this node, in points.

  • public Containment Containment

    What this node promises about its contents. CSS Containment 2's contain.

  • public Display Display

    Whether the node is laid out at all.

  • public BoxSizing BoxSizing

    What the dimensions measure.

  • public VerticalAlign VerticalAlign

    How this box sits against the line box it is on, if it is on one.

  • public float VerticalAlignOffset

    How far Offset raises this box off the baseline. Negative lowers it.

  • public StrutMetrics Strut

    The font metrics every line box in this container starts from. CSS 2.1 §10.8's strut.

  • public int Order

    Which ordinal group this item is laid out and painted in.

  • public float Flex

    The flex shorthand, if it was the thing that was set.

  • public float FlexGrow

    How much of the leftover space this node takes.

  • public float FlexShrink

    How much of an overflow this node absorbs.

  • public StyleLength FlexBasis

    The main size before growing and shrinking.

  • public float AspectRatio

    The width-to-height ratio the node is forced into.

  • public EdgeLengths Margin

    Outside the border box.

  • public EdgeLengths Position

    The offset applied by Relative and Absolute.

  • public EdgeLengths Padding

    Inside the border, outside the content.

  • public EdgeLengths Border

    Between padding and margin.

  • public GutterLengths Gap

    Between items and between lines.

  • public DimensionLengths Dimensions

    The requested size.

  • public DimensionLengths MinDimensions

    The floor.

  • public DimensionLengths MaxDimensions

    The ceiling.

  • public GridAutoFlow GridAutoFlow

    Which axis grid auto-placement fills, and whether it backfills holes.

  • public Align JustifyItems

    The inline-axis placement of every child of a grid container.

  • public Align JustifySelf

    This item's own inline-axis placement, overriding its container's.

  • public OverflowAlignment JustifyItemsOverflow
  • public OverflowAlignment JustifySelfOverflow
  • public GridPlacement GridRowStart

    Which row this item starts in.

  • public GridPlacement GridRowEnd

    Which row this item ends before.

  • public GridPlacement GridColumnStart

    Which column this item starts in.

  • public GridPlacement GridColumnEnd

    Which column this item ends before.

Used by (15)

  • BridgeFixtureVixen.Ui.Tests
  • ConformanceMeasureVixen.Ui.Layout.Tests
  • ContentSizingTestsVixen.Ui.Layout.Tests
  • DisplayKeywordSurfaceTestsVixen.Ui.Tests
  • FlexShrinkFromCssTestsVixen.Ui.Tests
  • LayoutStyleBridgeTestsVixen.Ui.Tests
  • LayoutStyleBuilderVixen.Ui
  • LayoutTreeVixen.Ui.Layout
  • LayoutTreeTestsVixen.Ui.Layout.Tests
  • LineHeightUnitTestsVixen.Ui.Tests
  • OverflowTestsVixen.Ui.Tests
  • SafeAlignmentFromCssTestsVixen.Ui.Tests
  • StyleResolutionVixen.Ui.Layout
  • TaffyStyleMapVixen.Ui.Layout.Tests
  • UiDocumentVixen.Ui