Yeqela kokuqukethwe okuyinhloko Yeqela ku-docs navigation
in English

Izinguquko ze-CSS

Sebenzisa izakhiwo ngokwezifiso ze-Bootstrap's CSS ukuze uthole ukwakheka nokuthuthuka okusheshayo nokubheke phambili.

I-Bootstrap ihlanganisa cishe amashumi amabili nambili izakhiwo ngokwezifiso ze-CSS (okuguquguqukayo) ku-CSS yayo ehlanganisiwe, nokunye okuningi okusendleleni yokwenziwa ngokwezifiso okuthuthukisiwe ngokwesisekelo sengxenye ngayinye. Lokhu kunikeza ukufinyelela okulula kumanani asetshenziswa kakhulu njengemibala yethu yetimu, ama-breakpoint, nezitaki zefonti eziyinhloko lapho usebenza kusihloli sesiphequluli sakho, ikhodi yesihlabathi, noma i-prototyping evamile.

Zonke izakhiwo zethu zangokwezifiso zifakwe kuqalabs- ukuze kugwenywe ukungqubuzana ne-CSS yenkampani yangaphandle.

Izinguquko zezimpande

Nazi izinto eziguquguqukayo esizihlanganisayo (qaphela ukuthi :rootkuyadingeka) ezingafinyeleleka noma kuphi lapho i-CSS ye-Bootstrap ilayishwa khona. Atholakala _root.scsskufayela lethu futhi afakiwe kumafayela ethu ahlanganisiwe e-dist.

:root {
  --bs-blue: #0d6efd;
  --bs-indigo: #6610f2;
  --bs-purple: #6f42c1;
  --bs-pink: #d63384;
  --bs-red: #dc3545;
  --bs-orange: #fd7e14;
  --bs-yellow: #ffc107;
  --bs-green: #198754;
  --bs-teal: #20c997;
  --bs-cyan: #0dcaf0;
  --bs-white: #fff;
  --bs-gray: #6c757d;
  --bs-gray-dark: #343a40;
  --bs-primary: #0d6efd;
  --bs-secondary: #6c757d;
  --bs-success: #198754;
  --bs-info: #0dcaf0;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
}

Izingxenye eziguquguqukayo

Futhi siyaqala ukusebenzisa izakhiwo zangokwezifiso njengokuguquguquka kwendawo kwezingxenye ezahlukahlukene. Ngale ndlela singakwazi ukunciphisa i-CSS yethu ehlanganisiwe, siqinisekise ukuthi izitayela azizuzwa njengefa ezindaweni ezifana namathebula afakwe isidleke, futhi sivumele ukuhlelwa kabusha okuyisisekelo nokunwetshwa kwezingxenye ze-Bootstrap ngemva kokuhlanganiswa kwe-Sass.

Bheka imibhalo yethu yethebula ukuze uthole ukuqonda okuthile kokuthi sisebenzisa kanjani okuguquguqukayo kwe-CSS .

Siphinde sisebenzisa okuguquguqukayo kwe-CSS kuwo wonke amagridi ethu—ikakhulukazi ama-gutters—okunokusetshenziswa kwengxenye eyengeziwe esikhathini esizayo.

Izibonelo

Okuguquguqukayo kwe-CSS kunikeza ukuguquguquka okufanayo kokuguquguqukayo kwe-Sass, kodwa ngaphandle kwesidingo sokuhlanganisa ngaphambi kokuthi kunikezwe isiphequluli. Isibonelo, lapha sisetha kabusha ifonti yekhasi lethu nezitayela zokuxhumanisa neziguquguqukayo ze-CSS.

body {
  font: 1rem/1.5 var(--bs-font-sans-serif);
}
a {
  color: var(--bs-blue);
}