Agba
Jiri color
klaasị ịba uru na-acha odo odo wepụta ihe pụtara. Gụnyere nkwado maka ịke njikọ yana steeti hover, kwa.
Agba
Jiri ihe eji agba agba ederede ederede. Ọ bụrụ na ịchọrọ ime ka njikọ agba agba, ị nwere ike iji .link-*
klaasị ndị enyemaka nke nwere :hover
na :focus
steeti.
.ederede-isi
.ederede-secondary
.ederede-aga nke ọma
.ederede-ihe egwu
.ederede ịdọ aka ná ntị
.ederede-ozi
.ederede-ọkụ
.ederede-ọchịchịrị
.ederede-ahụ
.ederede emechiri
.ederede-ọcha
.ederede-oji-50
.ederede-ọcha-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>
Na-eme ka ọ pụta ìhè na teknụzụ enyemaka
Iji agba iji gbakwunye ihe ọ pụtara naanị na-enye ihe ngosi anya, nke a na-agaghị ebugara ndị ọrụ teknụzụ enyemaka - dị ka ndị na-agụ ihuenyo. Gbaa mbọ hụ na ozi nke agba gosipụtara pụtara ìhè site na ọdịnaya n'onwe ya (dịka ederede a na-ahụ anya), ma ọ bụ tinye ya site na ụzọ ọzọ, dị ka ederede agbakwunyere zoro ezo na .visually-hidden
klaasị.
Nkọwapụta
Mgbe ụfọdụ, enweghị ike itinye klaasị gburugburu n'ihi nkọwapụta nke onye ọzọ. N'ọnọdụ ụfọdụ, ihe ngwọta zuru oke bụ iji <div>
klaasị achọrọ kechie ọdịnaya mmewere gị n'ime ihe ọmụmụ ma ọ bụ karịa.
Sass
Na mgbakwunye na ọrụ Sass ndị a, tụlee ịgụ gbasara njirimara omenala CSS anyị gụnyere (aka CSS variables) maka agba na ndị ọzọ.
Mgbanwe
A color
na-emepụta ọtụtụ ngwa ngwa site na agba isiokwu anyị, nke e kenyere ya site na mgbanwe palette agba anyị.
$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;
A na-enwekwa agba isi awọ, mana ọ bụ naanị obere ihe ka a na-eji wepụta akụrụngwa ọ bụla.
$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;
Maapụ
A na-etinyezi agba isiokwu n'ime maapụ Sass ka anyị nwee ike ijide ha iji mepụta akụrụngwa anyị, ihe mgbanwe akụrụngwa na ndị ọzọ.
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark
);
Agba isi awọ dịkwa ka maapụ Sass. Ejighị maapụ a mepụta akụrụngwa ọ bụla.
$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
);
Utilities API
A na-ekwupụta ngwa ọrụ agba na API ngwa anyị na scss/_utilities.scss
. Mụta otu esi eji ngwa API.
"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,
)
)
),