Fa'ase'e ile anotusi autu Fa'ase'e ile su'ega fa'amatalaga
in English

CSS fesuiaiga

Fa'aoga le CSS aganu'u meatotino a Bootstrap mo mamanu ma atina'e vave ma le va'ai i luma.

O le Bootstrap e aofia ai le tele o meatotino aganuʻu CSS (suiga) i lana CSS tuʻufaʻatasia mo le faʻatulagaina o taimi moni e aunoa ma le manaʻomia e toe faʻapipiʻi Sass. O nei mea e maua ai le avanoa faigofie i tulaga fa'aoga masani e pei o a tatou lanu autu, fa'amaufa'ailoga, ma fa'aputu vaitusi autu pe a galue i le su'esu'ega a lau su'esu'ega, se pusa oneone, po'o le fa'ata'ita'iga lautele.

O a matou mea totino uma e fa'apipi'iinabs- e 'alofia ai fete'ena'iga ma isi vaega CSS.

Fesuia'iga a'a

O fesuiaiga nei matou te aofia ai (matau e :rootmanaʻomia) e mafai ona maua i soʻo se mea e utaina ai le CSS Bootstrap. O lo'o iai i totonu o la matou _root.scssfaila ma aofia ai i totonu oa matou faila tu'ufa'atasia.

: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-gray-100: #f8f9fa;
  --bs-gray-200: #e9ecef;
  --bs-gray-300: #dee2e6;
  --bs-gray-400: #ced4da;
  --bs-gray-500: #adb5bd;
  --bs-gray-600: #6c757d;
  --bs-gray-700: #495057;
  --bs-gray-800: #343a40;
  --bs-gray-900: #212529;
  --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-primary-rgb: 13, 110, 253;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-success-rgb: 25, 135, 84;
  --bs-info-rgb: 13, 202, 240;
  --bs-warning-rgb: 255, 193, 7;
  --bs-danger-rgb: 220, 53, 69;
  --bs-light-rgb: 248, 249, 250;
  --bs-dark-rgb: 33, 37, 41;
  --bs-white-rgb: 255, 255, 255;
  --bs-black-rgb: 0, 0, 0;
  --bs-body-color-rgb: 33, 37, 41;
  --bs-body-bg-rgb: 255, 255, 255;
  --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));
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 1rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.5;
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
}

Su'ega vaega

Ua amata fo'i ona matou fa'aogaina meatotino fa'ale-aganu'u e fai ma suiga fa'apitonu'u mo vaega eseese. O le auala lea e mafai ai ona fa'aitiitia le CSS tu'ufa'atasia, fa'amautinoa e le'o tu'ufa'atasia sitaili i nofoaga e pei o laulau fa'amoega, ma fa'ataga nisi fa'avae toe fa'aleleia ma fa'alautele vaega o Bootstrap pe a mae'a fa'atasia Sass.

Va'ai i la matou laulau fa'amaumauga mo nisi fa'amatalaga i le fa'aogaina o le CSS fesuiaiga .

O lo'o matou fa'aogaina fo'i suiga CSS i luga o la matou fa'asologa—fa'amata'ina mo alavai-ma le tele o vaega fa'aoga e o'o mai i le lumana'i.

Faataitaiga

O fesuiaiga o le CSS e ofoina atu le fetuutuunai tutusa i fesuiaiga a Sass, ae aunoa ma le manaʻomia mo le tuʻufaʻatasia aʻo leʻi tuʻuina atu i le suʻega. Mo se fa'ata'ita'iga, o lo'o matou toe setiina le vai papatisoga ma sitaili feso'ota'iga ma suiga CSS.

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

Fa'amama fa'a

A'o matou fa'aaofia a matou fa'asologa fa'asologa e pei o suiga CSS (sei vagana ai xs), ia nofouta e le aoga le CSS i fesili fa'asalalau . Ole mea lea e ala ile mamanu ile CSS spec mo fesuiaiga, ae mafai ona suia i tausaga a sau ma le lagolago mo env()fesuiaiga. Siaki lenei tali Stack Overflow mo nisi fesoʻotaʻiga fesoasoani. I le taimi nei, e mafai ona e faʻaogaina nei fesuiaiga i isi tulaga CSS, faʻapea foʻi ma lau JavaScript.