Vixen
dd8b0a81
csharp
public enum OverflowAlignment

What an alignment does when what it is aligning does not fit: CSS Box Alignment §4.4's <overflow-position>.

Read the guide page for this →

Remarks

⚠ Nothing to do with Overflow, despite the word. That enum is overflow-x and overflow-y — whether content is clipped or scrolled. This one is the first half of an alignment value's grammar, [ safe | unsafe ]? <position>, and it decides what happens to that position when the free space goes negative.

⚠ It is a modifier on a position, not a position, which is why it is a second field beside AlignSelf and its five siblings rather than four more members on Align. safe end is not a third place to sit — it is end with a condition attached — and folding it into the position enum would put a new arm in every switch that reads one, each of which would answer start by falling through a default whether or not anything overflowed.

Fields and properties (2)

  • Unsafe

    Align as asked however far the subject overflows. The initial behaviour, and what every unprefixed keyword means.

  • Safe

    Align as asked, unless doing so would overflow, in which case align to start instead.

Used by (6)

  • LayoutStyleVixen.Ui.Layout
  • LayoutStyleBuilderVixen.Ui
  • LayoutTreeVixen.Ui.Layout
  • SafeAlignmentFromCssTestsVixen.Ui.Tests
  • SafeAlignmentTestsVixen.Ui.Layout.Tests
  • TaffyStyleMapVixen.Ui.Layout.Tests