public readonly record struct GridPlacementOne of an item's four placement properties.
Remarks
⚠ Line 0 does not exist. CSS Grid §8.3 numbers lines from 1 at the start edge of the explicit grid and from −1 at its end edge, with no zero between them, so a declared 0 is invalid and computes to auto. The corpus never writes one — its 6 636 placement values are all -?<int> or span <int> and none is 0 — so this rule is one of the ones no fixture can see, and GridPlacementTests holds it instead.
⚠ A negative line is relative to the explicit grid, not the final one. §8.3 resolves -1 against the end of the explicit grid before any implicit track exists, which means adding an implicit column on the right does not move what -1 pointed at. Resolving it against the final grid instead is self-referential — the grid's size depends on the placement that depends on the grid's size — and it is the bug that makes a -1 item drift as its siblings are added.
Fields and properties (4)
public GridPlacementKind KindWhich of the three forms this is.
public int ValueThe line number, or the span count. Meaningless for Auto.
public static readonly GridPlacement AutoAuto-placement decides. The initial value of all four properties.
public bool IsAutoWhether auto-placement decides this edge.
Methods (6)
public GridPlacement(GridPlacementKind Kind, int Value)One of an item's four placement properties.
public static GridPlacement Line(int line)A numbered line.
public static GridPlacement Span(int tracks)A number of tracks from the opposite edge.
public override string ToString()Returns the fully qualified type name of this instance.
public static bool TryParse(ReadOnlySpan<char> value, out GridPlacement placement)Reads one grid-{row,column}-{start,end} value.
public static bool TryParseShorthand(ReadOnlySpan<char> value, out GridPlacement start, out GridPlacement end)Reads a grid-column or grid-row shorthand.
Used by (8)
- GridBlindSpotTestsVixen.Ui.Layout.Tests
- GridTemplateAreasTestsVixen.Ui.Layout.Tests
- LayoutStyleVixen.Ui.Layout
- LayoutStyleBuilderVixen.Ui
- LayoutTreeVixen.Ui.Layout
- NamedPlacementPropertyVixen.Ui
- TaffyStyleMapVixen.Ui.Layout.Tests
- TransferredSizeTestsVixen.Ui.Layout.Tests