Source

Clearfix

Hi ku hatlisa no olova basisa swilo leswi papamalaka endzeni ka xigwitsirisi hi ku engetela xitirhisiwa xa clearfix.

Hlawula s hi ku olova floathi ku engetela .clearfix eka xiaki xa mutswari . Swinga tlhela switirhisiwa tani hi mixin.

<div class="clearfix">...</div>
// Mixin itself
@mixin clearfix() {
  &::after {
    display: block;
    content: "";
    clear: both;
  }
}

// Usage as a mixin
.element {
  @include clearfix;
}

Xikombiso lexi landzelaka xi kombisa ndlela leyi clearfix yi nga tirhisiwaka ha yona. Handle ka clearfix wrapping div a yi nga ta span around the buttons leswi a swi ta vanga layout leyi tshovekeke.

<div class="bg-info clearfix">
  <button type="button" class="btn btn-secondary float-left">Example Button floated left</button>
  <button type="button" class="btn btn-secondary float-right">Example Button floated right</button>
</div>