Media WebUI

Horizontal Spacing

Horizontal Spacing Example

<div class="row text-bold text-sm">
  <div class="col background-info-dark border-xs border-info gap-horizontal-md">
    <button type="button" class="button-sm button-info">Button 1</button>
    <button type="button" class="button-sm button-info">Button 2</button>
    <button type="button" class="button-sm button-info">Button 3</button>
  </div>
</div>
HTML
Horizontal Spacing

The gap-horizontal-* classes should not be used to separate WebUI layout columns, CSS grid columns or HTML multi-columns, but are intended for spacing elements within flex items or layout columns.

Horizontal Spacing Classes

The gap-horizontal-* classes can be used to create horizontal spacing between any immediate child elements, with the exception of layout or CSS grid rows and columns. They are ideal for separating form controls such as buttons or creating small gaps between images, but can be used to separate almost any elements.

CSS Size
gap-horizontal-xs 0.313rem
gap-horizontal-sm 0.625rem
gap-horizontal-md 0.938rem
gap-horizontal-lg 1.25rem
gap-horizontal-xl 1.563rem

Vertical Spacing

Vertical Spacing Example

Pellentesque habitant morbi tristique senectus
Pellentesque habitant morbi tristique senectus
Pellentesque habitant morbi tristique senectus
Pellentesque habitant morbi tristique senectus
<div class="container gap-vertical-sm">
  <div class="info-dark border-xs border-info pad-md">
    <div>Pellentesque habitant morbi tristique senectus</div>
  </div>
  <div class="info-dark border-xs border-info pad-md">
    <div>Pellentesque habitant morbi tristique senectus</div>
  </div>
  <div class="info-dark border-xs border-info pad-md">
    <div>Pellentesque habitant morbi tristique senectus</div>
  </div>
  <div class="info-dark border-xs border-info pad-md">
    <div>Pellentesque habitant morbi tristique senectus</div>
  </div>						
</div>
HTML
Vertical Spacing

The gap-vertical-* classes should not be used to separate WebUI layout rows or CSS grid rows, but are intended for spacing elements within flex items or layout columns.

Vertical Spacing Classes

The gap-vertical-* classes can be used to create vertical spacing between any immediate child elements, with the exception of layout or CSS grid rows and columns. They are ideal for separating form controls such as buttons or creating small gaps between images, but can be used for almost any elements.

CSS Size
gap-vertical-xs 0.313rem
gap-vertical-sm 0.625rem
gap-vertical-md 0.938rem
gap-vertical-lg 1.25rem
gap-vertical-xl 1.563rem

Row Spacing

Row Spacing Example

Lorem ipsum dolor sit amet, ius an possit alterum commune, solet labore erroribus qui ea, vitae laudem ex pro.

<div class="container info-dark border-xs border-info pad-md">
  <div class="kite-clip-shape width-sm-md height-sm-md background-info align-center"></div>
  <div class="row-spacing-lg"></div>
  <p>Lorem ipsum dolor sit amet, ius an possit alterum commune, solet labore erroribus qui ea, vitae laudem ex pro.</p>
</div>
HTML
Row Spacing Utility

NOTE: Using a row spacing utility element is a better choice than relying on margins for spacing in most cases. Issues can occur with overlapping or collapsing margins if margins are used on elements inside the normal document flow.

Row Spacing Classes

The row-spacing-* classes are used to apply spacing between elements with the exception of layout or CSS grid rows and columns. They can be used to create a vertical spacer element with a preset height, and can be inserted between most other elements. They provide a way to create ad-hoc spacing.

CSS Size
row-spacing-xs 0.313rem
row-spacing-sm 0.625rem
row-spacing-md 1.25rem
row-spacing-lg 1.875rem
row-spacing-xl 3.125rem

Margins

Margin Example

place-top-right margin-top-xs margin-right-sm
place-middle-left margin-left-sm
<div class="container background-info-dark height-lg-xl text-sm border-xs border-info">
  <div class="place-top-right margin-top-xs margin-right-sm pad-sm info">
    <div>place-top-right margin-top-xs margin-right-sm</div>
  </div>
  <div class="place-middle-left margin-left-sm pad-sm info">
    <div>place-middle-left margin-left-sm</div>
  </div>
</div>
HTML

Margin Classes

WebUI includes a number of utility classes that can be used to assist with element margins, as listed below. These classes can be used on their own or in combination with the place-* or dock-* classes. Margins used for adjusting elements should be used sparingly, with preferance given to padding instead.

Classes Size
margin-initial, margin-top-initial , margin-left-initial , margin-bottom-initial , margin-right-initial 0
margin-top-xxs , margin-left-xxs , margin-bottom-xxs , margin-right-xxs 0.625rem
margin-top-minus-xxs , margin-left-minus-xxs , margin-bottom-minus-xxs , margin-right-minus-xxs -0.625rem
margin-top-xxs-xs , margin-left-xxs-xs , margin-bottom-xxs-xs , margin-right-xxs-xs 0.938rem
margin-top-minus-xxs-xs , margin-left-minus-xxs-xs , margin-bottom-minus-xxs-xs , margin-right-minus-xxs-xs -0.938rem
margin-top-xs , margin-left-xs , margin-bottom-xs , margin-right-xs 1.25rem
margin-top-minus-xs , margin-left-minus-xs , margin-bottom-minus-xs , margin-right-minus-xs -1.25rem
margin-top-xs-sm , margin-left-xs-sm , margin-bottom-xs-sm , margin-right-xs-sm 1.875rem
margin-top-minus-xs-sm , margin-left-minus-xs-sm , margin-bottom-minus-xs-sm , margin-right-minus-xs-sm -1.875rem
margin-top-sm , margin-left-sm , margin-bottom-sm , margin-right-sm 2.5rem
margin-top-minus-sm , margin-left-minus-sm , margin-bottom-minus-sm , margin-right-minus-sm -2.5rem
margin-top-sm-md , margin-left-sm-md , margin-bottom-sm-md , margin-right-sm-md 3.75rem
margin-top-minus-sm-md , margin-left-minus-sm-md , margin-bottom-minus-sm-md , margin-right-minus-sm-md -3.75rem
margin-top-md , margin-left-md , margin-bottom-md , margin-right-md 5rem
margin-top-minus-md , margin-left-minus-md , margin-bottom-minus-md , margin-right-minus-md -5rem
margin-top-md-lg , margin-left-md-lg , margin-bottom-md-lg , margin-right-md-lg 7.5rem
margin-top-minus-md-lg , margin-left-minus-md-lg , margin-bottom-minus-md-lg , margin-right-minus-md-lg -7.5rem
margin-top-lg , margin-left-lg , margin-bottom-lg , margin-right-lg 10rem
margin-top-minus-lg , margin-left-minus-lg , margin-bottom-minus-lg , margin-right-minus-lg -10rem
margin-top-lg-xl , margin-left-lg-xl , margin-bottom-lg-xl , margin-right-lg-xl 15rem
margin-top-minus-lg-xl , margin-left-minus-lg-xl , margin-bottom-minus-lg-xl , margin-right-minus-lg-xl -15rem
margin-top-xl , margin-left-xl , margin-bottom-xl , margin-right-xl 20rem
margin-top-minus-xl , margin-left-minus-xl , margin-bottom-minus-xl , margin-right-minus-xl -20rem
margin-top-xl-xxl , margin-left-xl-xxl , margin-bottom-xl-xxl , margin-right-xl-xxl 30rem
margin-top-minus-xl-xxl , margin-left-minus-xl-xxl , margin-bottom-minus-xl-xxl , margin-right-minus-xl-xxl -30rem
margin-top-xxl , margin-left-xxl , margin-bottom-xxl , margin-right-xxl 40rem
margin-top-minus-xxl , margin-left-minus-xxl , margin-bottom-minus-xxl , margin-right-minus-xxl -40rem
Using Margins

Margins used for adjusting elements should be used sparingly, with preferance given to padding instead. Where possible, try to use gap-* or pad-*utility classes instead. Margins are relatively predictable when used with elements using absolute positioning, as in the example above.