Tlula eka nhlokomhaka-nkulu Tlula eka docs navigation
in English

Mihlovo

Hundzuluxa nhlamuselo hi ku tirhisa colortitlilasi ti nga ri tingani ta vukorhokeri bya mihlovo. Ku katsa na nseketelo wa switayili swa swihlanganisi na swiyimo swa hover, na swona.

Mihlovo

Endla mihlovo ya tsalwa hi switirhisiwa swa mihlovo. Loko u lava ku colorize swihlanganisi, u nga tirhisa .link-*titlilasi ta mupfuni leti nga na :hoverna ti :focusstates.

.tsalwa-xitsongwatsongwana

.tsalwa-xikondari

.ku humelela ka tsalwa

.khombo ra tsalwa

.xitsundzuxo xa tsalwa

.vuxokoxoko bya tsalwa

.tsalwa-ku vonakala

.tsalwa-munyama

.tsalwa-miri

.ku pfariwa hi tsalwa

.tsalwa-wo basa

.tsalwa-ntima-50

.tsalwa-xo basa-50

<p class="text-primary">.text-primary</p>
<p class="text-secondary">.text-secondary</p>
<p class="text-success">.text-success</p>
<p class="text-danger">.text-danger</p>
<p class="text-warning bg-dark">.text-warning</p>
<p class="text-info bg-dark">.text-info</p>
<p class="text-light bg-dark">.text-light</p>
<p class="text-dark">.text-dark</p>
<p class="text-body">.text-body</p>
<p class="text-muted">.text-muted</p>
<p class="text-white bg-dark">.text-white</p>
<p class="text-black-50">.text-black-50</p>
<p class="text-white-50 bg-dark">.text-white-50</p>
Ku hundzisela nhlamuselo eka thekinoloji yo pfuneta

Ku tirhisa muvala ku engetela nhlamuselo swi nyika ntsena xikombiso xa xivono, lexi nga ta ka xi nga hundziseriwi eka vatirhisi va thekinoloji yo pfuneta – ku fana na swihlaya swa xikirini. Tiyisisa leswaku mahungu lama kombisiweke hi muvala ya le rivaleni eka nhundzu hi yoxe (xikombiso tsalwa leri vonakaka), kumbe ya katsiwile hi tindlela tin’wana, ku fana na tsalwa ro engetela leri fihliweke na .visually-hiddentlilasi.

Ku kongoma

Minkarhi yin’wana titlilasi ta xiyimo a ti nge tirhisiwi hikwalaho ka ku kongoma ka muhlawuri un’wana. Eka swiyimo swin’wana, ndlela leyi eneleke yo tshungula i ku phutsela nhundzu ya elemente ya wena eka elemente <div>kumbe ku tlula ya semantiki hi tlilasi leyi lavekaka.

Sass

Ku engetela eka ntirho wa Sass lowu landzelaka, anakanya hi ku hlaya hi swihlawulekisi swa hina swa ntolovelo swa CSS leswi katsiweke (aka swilo leswi cinca-cincaka swa CSS) swa mihlovo na swin’wana.

Swilo leswi cinca-cincaka

Switirhisiwa swo tala colorswi endliwa hi mihlovo ya hina ya nhlokomhaka, leyi averiweke nakambe ku suka eka swilo swa hina leswi cinca-cincaka swa phalete ya mihlovo ya xivumbeko xa le henhla.

$blue:    #0d6efd;
$indigo:  #6610f2;
$purple:  #6f42c1;
$pink:    #d63384;
$red:     #dc3545;
$orange:  #fd7e14;
$yellow:  #ffc107;
$green:   #198754;
$teal:    #20c997;
$cyan:    #0dcaf0;
$primary:       $blue;
$secondary:     $gray-600;
$success:       $green;
$info:          $cyan;
$warning:       $yellow;
$danger:        $red;
$light:         $gray-100;
$dark:          $gray-900;

Mihlovo ya greyscale na yona ya kumeka, kambe ku tirhisiwa ntsena ntlawa lowutsongo ku humesa switirhisiwa swihi na swihi.

$white:    #fff;
$gray-100: #f8f9fa;
$gray-200: #e9ecef;
$gray-300: #dee2e6;
$gray-400: #ced4da;
$gray-500: #adb5bd;
$gray-600: #6c757d;
$gray-700: #495057;
$gray-800: #343a40;
$gray-900: #212529;
$black:    #000;

Mepe

Mihlovo ya theme yi tlhela yi vekiwa eka mepe wa Sass leswaku hi ta kota ku loop ehenhla ka yona ku humesa switirhisiwa swa hina, swicinci swa swiphemu, na swin’wana.

$theme-colors: (
  "primary":    $primary,
  "secondary":  $secondary,
  "success":    $success,
  "info":       $info,
  "warning":    $warning,
  "danger":     $danger,
  "light":      $light,
  "dark":       $dark
);

Mihlovo ya greyscale yitlhela yi kumeka tani hi mepe wa Sass. Mepe lowu a wu tirhisiwi ku endla switirhisiwa swihi na swihi.

$grays: (
  "100": $gray-100,
  "200": $gray-200,
  "300": $gray-300,
  "400": $gray-400,
  "500": $gray-500,
  "600": $gray-600,
  "700": $gray-700,
  "800": $gray-800,
  "900": $gray-900
);

API ya switirhisiwa

Switirhisiwa swa mihlovo swi tivisiwile eka switirhisiwa swa hina API hi scss/_utilities.scss. Dyondza ndlela yo tirhisa API ya switirhisiwa.

    "color": (
      property: color,
      class: text,
      values: map-merge(
        $theme-colors,
        (
          "white": $white,
          "body": $body-color,
          "muted": $text-muted,
          "black-50": rgba($black, .5),
          "white-50": rgba($white, .5),
          "reset": inherit,
        )
      )
    ),