Vixen
dd8b0a81
csharp
public enum Clear

Which floats a box refuses to sit beside, per CSS 2.1 §9.5.2.

Read the guide page for this →

Remarks

⚠ clear does not move floats; it moves the box that declares it. The box's top border edge is pushed down until it is below the bottom margin edge of every earlier float on the named side, by inserting clearance between the box's top margin and its top border. Clearance is not a margin: it does not collapse, and the margin it displaces is spent rather than carried forward.

⚠ Left and Right are physical and do not flip with Direction. §9.5.2's keywords name the same two sides FloatSide does, and neither pair is writing-mode-relative in CSS 2.1. InlineStart and InlineEnd are the flow-relative pair CSS Logical Properties adds beside them, and they exist because the first two do not.

Fields and properties (6)

  • None

    Nothing is cleared: the box sits wherever margin collapsing put it.

  • Left

    clear: left — below every earlier left float.

  • Right

    clear: right — below every earlier right float.

  • Both

    clear: both — below every earlier float on either side.

  • InlineStart

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

  • InlineEnd

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

Used by (6)

  • FloatBlindSpotTestsVixen.Ui.Layout.Tests
  • KeywordsVixen.Ui
  • LayoutStyleVixen.Ui.Layout
  • LayoutStyleBuilderVixen.Ui
  • LayoutTreeVixen.Ui.Layout
  • TaffyStyleMapVixen.Ui.Layout.Tests