Mebala
Hlahisa moelelo ka color
lihlopha tse 'maloa tsa lisebelisoa tsa mebala. E kenyelletsa tšehetso bakeng sa likhokahano tsa setaele le libaka tsa hover, hape.
Mebala
Kenya mebala ka lisebelisoa tsa mebala. Haeba u batla ho kenya lihokelo ka mebala, u ka sebelisa .link-*
litlelase tsa bathusi tse nang :hover
le le :focus
ho re.
.mongolo-motheo
.mongolo-bobedi
.katleho ya mongolo
.kotsi ea mongolo
.temoso ya mongolo
.mangolo-tsebiso
.sengolo-lebone
.mongolo-fifi
.mongolo-mmele
.mongolo o kgutsitse
.mongolo-tshweu
.mongolo-botsho-50
.mongolo-bosweu-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>
Ho fetisa moelelo ho litheknoloji tse thusang
Ho sebelisa mebala ho eketsa moelelo ho fana feela ka pontšo ea pono, e ke keng ea fetisetsoa ho basebelisi ba theknoloji e thusang - joalo ka sebali sa skrine. Netefatsa hore tlhahisoleseding e hlahisitsweng ke mmala e ka ba e totobetseng ho tswa ho dikahare ka boyona (mohlala, mongolo o bonahalang), kapa e kenyeleditswe ka mekgwa e meng, e kang mongolo o tlatsetso o patilweng le .visually-hidden
sehlopha.
Tse khethehileng
Ka linako tse ling litlelase tsa maemo a itseng li ke ke tsa sebelisoa ka lebaka la khetho ea mokhethoa e mong. Maemong a mang, mokhoa o lekaneng oa ho sebetsa ke ho thatela litaba tsa element ea hau ka karolo ea <div>
semantic kapa ho feta ka sehlopha seo u se batlang.
Sass
Ntle le ts'ebetso e latelang ea Sass, nahana ka ho bala ka thepa ea rona e kenyellelitsoeng ea CSS (mefuta e fapaneng ea CSS) bakeng sa mebala le tse ling.
Lintho tse fapaneng
Lisebelisoa tse ngata color
li hlahisoa ke mebala ea rona ea sehlooho, e abetsoeng bocha ho tsoa ho mefuta ea rona ea mebala e tloaelehileng.
$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;
Mebala ea Grayscale le eona ea fumaneha, empa ho sebelisoa karoloana feela ho hlahisa lisebelisoa life kapa life.
$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;
'Mapa
Mebala ea theme e tla beoa 'mapeng oa Sass hore re tsebe ho o pota-pota ho hlahisa lisebelisoa tsa rona, lintlafatso tsa likarolo, le tse ling.
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $success,
"info": $info,
"warning": $warning,
"danger": $danger,
"light": $light,
"dark": $dark
);
Mebala ea Grayscale e fumaneha hape joalo ka 'mapa oa Sass. 'Mapa ona ha o sebelisoe ho hlahisa lisebelisoa.
$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
Lisebelisoa tsa mebala li hlahisoa lits'ebetsong tsa rona tsa API ho scss/_utilities.scss
. Ithute ho sebelisa lisebelisoa tsa 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,
)
)
),