Vixen
dd8b0a81
csharp
public enum FloatSide

Which side a box floats to, per CSS 2.1 §9.5.

Read the guide page for this →

Remarks

⚠ A float is out of flow but not out of the picture, which is what makes it unlike Absolute. An absolute box is removed and forgotten: nothing else moves because of it. A float is removed from the flow and then shortens what is left — the line boxes beside it, the border box of any sibling that establishes a formatting context of its own, and the height of the block formatting context that contains it. So the store cannot record it as a positioning scheme and stop there; it has to keep a live exclusion list for the whole formatting context, which is what LayoutTree.Floats is.

⚠ Floating a box also makes it a block formatting context root and a block-level box. §9.7's table turns any display other than none into a block-level equivalent once float is set, and §9.4.1 makes it a context root — which is why EstablishesBlockFormattingContext reads this field and why a float's margins never collapse with anything.

Fields and properties (5)

  • None

    Not floated: the box stays in normal flow.

  • Left

    float: left — against the left content edge, or the last left float's right edge.

  • Right

    float: right — against the right content edge, or the last right float's left edge.

  • InlineStart

    float: inline-start — Left in LTR and Right in RTL.

  • InlineEnd

    float: inline-end — Right in LTR and Left in RTL.

Used by (10)

  • BlockificationTestsVixen.Ui.Layout.Tests
  • FloatBandQueryTestsVixen.Ui.Layout.Tests
  • FloatBlindSpotTestsVixen.Ui.Layout.Tests
  • InlineFloatInteractionTestsVixen.Ui.Layout.Tests
  • KeywordsVixen.Ui
  • LayoutStyleVixen.Ui.Layout
  • LayoutStyleBuilderVixen.Ui
  • LayoutTreeVixen.Ui.Layout
  • PlacedFloatVixen.Ui.Layout
  • TaffyStyleMapVixen.Ui.Layout.Tests