Migrating ka taa v4 la
Bootstrap 4 ye porozɛ bɛɛ sɛbɛncogo kura ye. Yɛlɛma minnu kɔlɔsira kosɛbɛ, olu bɛ lajɛ jukɔrɔ, o kɔfɛ, fɛn kɛrɛnkɛrɛnnenw bɛ kɛ yɔrɔw la minnu bɛ tali kɛ o la.
Ni an bɛ Bɔ Beta 3 la ka Taa an ka v4.0 bɔko sabatilen na, 'yὲlɛma karilen si tɛ yen, nka 'yὲlɛma kɛrɛnkɛrɛnnen dɔw bɛ yen.
-
Print utilities tiɲɛnenw labɛnna. Fɔlɔ, baara kɛli ni
.d-print-*
kalasi dɔ ye, o tun bɛna kalansen wɛrɛ bɛɛ tiɲɛ k’a sɔrɔ i ma miiri o.d-*
la. Sisan, u bɛ bɛn an ka jiracogo nafama tɔw ma ani u bɛ tali kɛ o kunnafonidilan dɔrɔn de la (@media print
). -
Sɛbɛnni jiracogo nafama minnu bɛ sɔrɔ, olu bonyalen don walasa u ka bɛn nafamafɛn wɛrɛw ma. Beta 3 ni kɔ dɔrɔn de tun
block
bɛ ,inline-block
,inline
, aninone
. Stable v4 faralaflex
,inline-flex
,table
,table-row
, anitable-cell
. -
sɛbɛnni ɲɛbila jiracogo labɛnni nakɔsɛnɛyɔrɔw cɛ ni sɛbɛnni kɛcogo kura ye minnu b' a jira
@page
size
.
K’a sɔrɔ Beta 2 y’an ka kari caman yeli caman ye beta dakun na, nka hali bi an bɛ dɔw sɔrɔ minnu ka kan ka ɲɛnabɔ Beta 3 bɔko kɔnɔ. O fɛn caman bɛ Kɛ n’i bɛ Beta 3 ladamu ka Bɔ Beta 2 la walima Bootstrap kɔrɔ dɔ la.
- A ye fɛn caman sɛgɛsɛgɛli kɛ minnu tɛ baara kɛ ni u
$thumbnail-transition
ye. An tun tɛ transition (tɛmɛsira) kɛ foyi la, o la, a tun ye extra code (kode wɛrɛ) dɔrɔn de ye. - npm foroko kɔnɔ, filen wɛrɛw tɛ yen tugun n’an ka source ani dist filew tɛ; n’i y’i jigi da u kan ani n’i tun bɛ an ka sɛbɛnniw boli
node_modules
foli fɛ, i ka kan k’i ka baarakɛcogo bɛrɛbɛn.
-
A ye ladamulenw ni kɔrɔlenw bɛɛ sɛbɛn kokura ani arajow. Sisan, u fla bɛɛ ka HTML jɔcogo bɛ Bɛn (kɛnɛma
<div>
ni balimakɛ<input>
ani<label>
) ani labɛncogo kelenw (stacked default, inline with modifier class). O b’a to an bɛ se ka labeli cogoya kɛ ka da donta cogoya kan, ka dɛmɛ nɔgɔyadisabled
fɛntigiya la (a tun bɛ bangebaga ka kalasi de wajibiya fɔlɔ) ani ka dɛmɛ don ka ɲɛ an ka foroko tiɲɛni na.O hukumu kɔnɔ, an ye CSS caman Changé ka ɲɛsin
background-image
s caman ɲɛnabɔli ma custom form checkboxes ani arajow kan. Fɔlɔ, fɛn min bɔra sisan,.custom-control-indicator
o tun bɛ ni kɔkanna kulɛri, gradient ani SVG taamasiyɛn ye. Ka kɔkanna jiginni kɛ ka kɛɲɛ ni i yɛrɛ sago ye, o kɔrɔ tun ye k’o bɛɛ wuli tuma o tuma n’i mago tun bɛ ka kelen dɔrɔn Changer. Sisan, an bɛ.custom-control-label::before
ka fa ni gradient ani.custom-control-label::after
handles icon.Walasa ka ladamu sɛgɛsɛgɛli kɛ inline kɔnɔ, i ka fara
.custom-control-inline
. -
Sugandili kura donna butɔni kuluw kama minnu sinsinnen bɛ dontaw kan. Sani
[data-toggle="buttons"] { }
an ka baara Kɛ ni cogoya ni kɛcogo ye, an bɛ baara Kɛ ni fɛn yedata
min bɛ Kɛ JS taamacogo dɔrɔn de kama ani ka an jigi Da.btn-group-toggle
kalasi kura kan cogoya la. -
A bɔra
.col-form-legend
ka ɲɛsin dɔ ma min ɲɛnabɔra dɔɔnin.col-form-label
. O cogo la.col-form-label-sm
ani a.col-form-label-lg
bɛ se ka baara kɛ ni<legend>
fɛnw ye ni nɔgɔya ye. -
Custom file inputs ye fɛn dɔ sɔrɔ u ka
$custom-file-text
Sass variable na. A tɛ Sass karti nested ye tugun wa sisan a bɛ fanga Di sɛrɛ kelen dɔrɔn de ma—Browse
butɔni i n’a fɔ o de ye sisan pseudo-element kelenpe ye min bɛ Bɔ an ka Sass la. Sɛbɛn inChoose file
bɛ bɔ sisan.custom-file-label
.
-
Donan kulu farankanw ye sisan kɛrɛnkɛrɛnnenya la u bilali ye ka kɛɲɛ ni donta dɔ ye. An ye jigin
.input-group-addon
ani.input-group-btn
ka kalan kura fila kɛ,.input-group-prepend
ani.input-group-append
. I ka kan ka baara kɛ ni append walima prepend ye k’a jɛya sisan, ka an ka CSS fanba nɔgɔya. Append walima prepend kɔnɔ, i ka butɔni bila i n’a fɔ u bɛna kɛ cogo min na yɔrɔ wɛrɛ la, nka i ka sɛbɛnniw siri.input-group-text
. -
Sisan, dantigɛli kɛcogoyaw bɛ dɛmɛ, i n’a fɔ donnakow caman (hali n’i bɛ se ka doncogo kelen dɔrɔn de dafa kulu kelen-kelen bɛɛ la).
-
Sizing classes ka kan ka kɛ bangebaga kan
.input-group
wa a man kan ka kɛ foroko element kelen-kelenw kan.
K’an to beta la, an b’a ɲini ka fɛn caman Changements breaking si sɔrɔ. Nka, kow tɛ taa ɲɛ tuma bɛɛ i n’a fɔ a labɛnna cogo min na. Yɛlɛma karilenw bɛ duguma minnu ka kan ka to i hakili la n’i bɛ bɔ Beta 1 la ka taa Beta 2 la.
- A bɔra
$badge-color
fɛn caman sɛgɛsɛgɛli la ani a baaracogo kan.badge
. An bɛ baara Kɛ ni kulɛri danfara baarakɛcogo ye walasa ka pick acolor
based on thebackground-color
, o la variable tɛ mako ɲɛ. - Tɔgɔ kura donna
grayscale()
baarakɛcogo la walasagray()
ka bɛnbaliya tiɲɛ ni CSS nativegrayscale
filter ye. - Tɔgɔ caman dira
.table-inverse
,.thead-inverse
, ani.thead-default
ka taa.*-dark
ani.*-light
, ka bɛn an ka kulɛriw ma minnu bɛ kɛ yɔrɔ wɛrɛw la. - Tabali minnu bɛ jaabi di, olu bɛ kalasiw lawuli sisan grid breakpoint kelen-kelen bɛɛ kama. nin bɛ kari ka bɔ Beta 1 la k' a sɔrɔ
.table-responsive
i bɛ baara kɛ ni min ye , o ka ca ni.table-responsive-md
. Aw bɛ se ka baara kɛ ni a ye sisan.table-responsive
walima ni aw.table-responsive-{sm,md,lg,xl}
mago bɛ a la. - Bower dɛmɛni bilala ka da a kan pake ɲɛmɔgɔ bɛ ban ka ɲɛsin fɛɛrɛ wɛrɛw ma (misali la, Yarn walima npm). Aw ye bower/bower#2298 lajɛ walasa ka kunnafoni wɛrɛw sɔrɔ.
- Bootstrap bɛ jQuery 1.9.1 walima a sanfɛta de wajibiya hali bi, nka i bɛ ladilikan sɔrɔ ka baara kɛ ni version 3.x ye bawo v3.x ka dɛmɛnanw ye Bootstrap bɛ minnu dɛmɛ ka fara v3.x kan lakana labɛnni dɔw bɛ yen.
.form-control-label
A ye kalasi min ma baara kɛ , o bɔ yen. N'i ye baara Kɛ ni nin kàlan in ye, o tùn ye.col-form-label
kalasi duplicate ye min bɛ vertically centered a<label>
n'a bɛ tali Kɛ input in horizontal form layouts la.- Yɛlɛma don ka
color-yiq
bɔ mixin dɔ la min tun bɛcolor
nafolomafɛnw na ka taa baarakɛcogo la min bɛ nafa dɔ segin, min b’a to i bɛ se ka baara kɛ n’a ye CSS nafolomafɛn o nafolomafɛn na. Misali la, sannicolor-yiq(#000)
i ka sɛbɛnni kɛcolor: color-yiq(#000);
.
pointer-events
A ye baarakɛcogo kura Dabɔ modɛliw kan. Kɛnɛma.modal-dialog
bɛ tɛmɛ ko kɛlenw fɛ nipointer-events: none
for custom click handling (o b’a to a bɛ se ka dɔrɔn ka lamɛnni kɛ kan.modal-backdrop
for any clicks), ka sɔrɔ ka counteract it for the actual.modal-content
withpointer-events: auto
.
Nin ye tikiti fɛnbaw ye aw bɛna a fɛ ka minnu dɔn ni aw bɛ bɔ v3 la ka taa v4 la.
- A ye IE8, IE9, ani iOS 6 dɛmɛni bila. v4 ye sisan IE10+ ni iOS 7+ dɔrɔn de ye. Siti minnu mago bɛ o fila la kelen na, baara kɛ ni v3 ye.
- A ye dɛmɛ ofisiyali dɔ fara a kan Android v5.0 Lollipop ka Browser ani WebView kan. Android Browser ni WebView bɔko fɔlɔw bɛ to dɔrɔn ka dɛmɛ sɔrɔ cogo la min tɛ foroba ye.
- Flexbox bɛ baara kɛ ni a daminɛ ye. A bɛɛ lajɛlen na o kɔrɔ ye ka yɔrɔ janya floats la ani ka dɔ fara an ka components kan.
- A jiginna ka bɔ Less la ka taa Sass la an ka source CSS filew kama.
- A jiginna ka bɔ
px
ka narem
i n’a fɔ an ka CSS yɔrɔ fɔlɔ, hali ni pixelw bɛ baara kɛ hali bi kunnafonidilanw ɲininkaliw ni grid kɛcogo la bawo minɛnw lajɛyɔrɔw tɛ nɔ bila suguya hakɛ la. - Duniya kɔnɔ sɛbɛnnibolow hakɛ cayara ka bɔ
14px
ka se16px
. - A ye grid tiers (jatebɔlanw) labɛn kokura walasa ka sugandi duurunan fara a kan (ka minɛn misɛnninw ladɛrɛsi
576px
ani minnu bɛ duguma) ani ka infix (-xs
infix) bɔ o kalasiw la. Misali la:.col-6.col-sm-4.col-md-3
. - A ye sugandili barokun danfaralen bila a nɔ na ni sugandiliw ye minnu bɛ se ka labɛn SCSS fɛn caman sɛgɛsɛgɛli fɛ (misali la,
$enable-gradients: true
). - Build system overhauled ka baara kɛ ni npm sɛbɛnniw ye minnu bɛ tugu ɲɔgɔn na Grunt nɔ na. Aw
package.json
ye sɛbɛnniw bɛɛ lajɛ, walima an ka porozɛ readme sigida yiriwali magow kama. - Bootstrap baarakɛcogo min tɛ jaabi ye, o tɛ dɛmɛ tugun.
- A ye ɛntɛrinɛti Customizer bila ka ɲɛsin sigicogo sɛbɛnw ma minnu ka bon kosɛbɛ ani ka fɛnw jɔ minnu bɛ kɛ ka kɛɲɛ ni mɔgɔw sago ye.
- A ye nafalan kalasi kura tan ni caman fara a kan CSS nafolo-nafa fila jɛlenw kama ani margin/padding spacing shortcuts.
- A jiginna ka taa flexbox la.
- A ye dɛmɛ fara flexbox kan grid mixins kɔnɔ ani kalan minnu ɲɛfɔlen don ka kɔn.
- I n’a fɔ flexbox yɔrɔ dɔ, dɛmɛni tun bɛ a kɔnɔ ka ɲɛsin vertical ani horizontal alignment classes ma.
- Grid kalasi tɔgɔ kura ani grid tier kura.
sm
A ye grid tier kura dɔ fara a kan jukɔrɔ768px
walasa ka granular control caman sɔrɔ. An bɛ sisanxs
,sm
,md
,lg
, anixl
. O fana kɔrɔ ye ko tier bɛɛ bumped up nivo kelen (o.col-md-6
la v3 kɔnɔ a.col-lg-6
bɛ v4 kɔnɔ sisan).xs
grid classes bεε bεε bεε bε bεn a ma ko infix ka bεnkansεbεn jira ka ɲɛ ko u bε daminε ka styles (dakunw) waleyamin-width: 0
ni a tε pixel value (pixel) hakɛ sigilen ye. Sani.col-xs-6
, a bɛ kɛ sisan.col-6
. Grid tier tɔw bɛɛ bɛ infix de wajibiya (misali la,sm
).
- Grid hakɛw, mixins ani variables kurayali.
- Grid gutters bɛ Sass karti sɔrɔ sisan walasa i ka se ka gutterw bonya kɛrɛnkɛrɛnnenw jira kariyɔrɔ kelen-kelen bɛɛ la.
- Updated grid mixins ka baara kɛ ni
make-col-ready
prep mixin ye ani amake-col
ka set theflex
animax-width
for individual column sizing. - Yɛlɛma donna grid system media ɲininkali breakpoints ani container widths walasa ka jatebɔ kɛ grid tier kura kan ani ka a jira ko kolonw bɛ tila cogo kelen na ni
12
u max width ye. - Grid breakpoints ani container widths bɛ ɲɛnabɔ sisan Sass kartiw fɛ (
$grid-breakpoints
ani$container-max-widths
) sanni ka kɛ fɛn caman ɲɔgɔnna danfaralenw ye. Olu bɛ fɛn caman ɲɔgɔnna caman bila u nɔ na@screen-*
pewu ani k’a to i bɛ se ka grid tiers (jatebɔlanw) labɛn ka ɲɛ. - Kunnafonidila ɲininkaliw fana Changé. Sanni an ka segin an ka kunnafonidilanw ɲininkali fɔlenw kan ni nafa kelen ye waati kelen-kelen bɛɛ la, an bɛ sisan
@include media-breakpoint-up/down/only
. Sisan, sanni i ka sɛbɛnni kɛ@media (min-width: @screen-sm-min) { ... }
, i bɛ se ka sɛbɛnni kɛ@include media-breakpoint-up(sm) { ... }
.
- Panɛliw, ja fitininw ani kɔlɔnw binna walasa ka yɔrɔ kura dɔ sɔrɔ min bɛ fɛn bɛɛ lajɛlen na, n’o ye kartiw ye .
- A ye Glyphicons taamasiyɛn sɛbɛnnibolo fili. Ni aw mago bɛ taamasiyɛnw na, sugandi dɔw ye:
- Glyphicons ka sanfɛla bɔko
- Octicɔnw
- Font Kabako
- Aw ye sɛbɛn ɲɛ Extend lajɛ walasa ka fɛɛrɛ wɛrɛw sɔrɔ. Yala hakilina wɛrɛw bɛ yen wa? Aw ye bɔko dɔ da wuli walima PR.
- Affix jQuery ka fɛnsɛbɛnni bɔra.
- An bɛ a fɔ aw ye ko aw ka baara kɛ
position: sticky
o nɔ na. Aw ye HTML5 Aw ye sɛbɛn lajɛ walasa ka kunnafoni wɛrɛw sɔrɔ ani ka polifilɛli ladilikan kɛrɛnkɛrɛnnenw sɔrɔ. Ladilikan dɔ ye ka baara kɛ ni@supports
sariya dɔ ye walasa k’a waleya (misali la,@supports (position: sticky) { ... }
)/ - Ni i tun bɛ baara kɛ ni Affix ye walasa ka fɛn wɛrɛw kɛ, minnu tɛ
position
cogoyaw ye, a bɛ se ka kɛ ko polifiliw tɛna i ka baarakɛcogo dɛmɛ. O baara suguw sugandicogo dɔ ye ScrollPos-Styler gafemarayɔrɔ sabanan ye.
- An bɛ a fɔ aw ye ko aw ka baara kɛ
- A ye pager component (yɔrɔ) Dòn i n'a fɔ a tùn ye 'butɔni ye min tùn bɛ Labɛn dɔɔnin dɔɔnin.
- A ye fɛnw bɛɛ lajɛlen labɛn kokura walasa ka baara kɛ ni kalan sugandilanw ye minnu tɛ sigiyɔrɔma caman ye sanni ka baara kɛ ni denmisɛnw sugandili kɛrɛnkɛrɛnnenw ye minnu ka ca kojugu.
Nin lisi in bɛ fɛnba dɔw jira minnu bɛ fɛn caman Changements par component (yɔrɔ) minnu bɛ v3.xx ni v4.0.0 cɛ.
Bootstrap 4 kura ye Reboot ye , n’o ye cogoya kura ye min bɛ jɔ Normalize kan n’an yɛrɛ ka hakilinata-jɔ-cogo dɔw ye minnu bɛ Se ka Lasegin u cogo kɔrɔ la. Sugandili minnu bɛ jira nin dosiye in kɔnɔ, olu bɛ baara kɛ ni fɛnw dɔrɔn de ye—kalanso si tɛ yan. O b’an ka reset cogoyaw Bɔ an ka component cogoyaw la walasa ka fɛɛrɛ dɔ Kɛ min ka ca ni modulari ye. Reset nafama dɔw minnu bɛ o la olu ye box-sizing: border-box
fɛn caman yeli ye, ka bɔ em
ka taa rem
unitw la fɛn caman kan, link styles, ani form element reset caman.
.text-
A ye nafalanw bɛɛ wuli ka taa_utilities.scss
dosiye kɔnɔ.- A Dònna
.page-header
i n'a fɔ a cogoyaw bɛ Se ka Kɛ ni nafalanw ye. .dl-horizontal
ye a fili. O nɔ na, aw bɛ baara kɛ ni.row
kan<dl>
ani ka baara kɛ ni grid column classes (walima mixins) ye a<dt>
ni<dd>
denmisɛnw kan.- Bloki-sɛbɛnw labɛnna kokura, k’u ka cogoyaw Bɔ
<blockquote>
fɛn na ka Taa kalasi kelen na,.blockquote
. A ye modifier (daɲɛw sɛgɛsɛgɛli) Blà.blockquote-reverse
sɛbɛnni nafamafɛnw kama. .list-inline
sisan a b’a ɲini a denw fɛ u ka fɛnw lisi kɛ ni.list-inline-item
kalan kura ye min bɛ tali kɛ u la.
- A tɔgɔ jiginna
.img-responsive
ka kɛ.img-fluid
. - A tɔgɔ jiginna
.img-rounded
ka kɛ.rounded
- A tɔgɔ jiginna
.img-circle
ka kɛ.rounded-circle
- Sugandili in misaliw bɛɛ bɛ
>
ɲini ka Bɔ yen, o kɔrɔ ye ko tabali minnu bɛ 'kɔnɔ, olu bɛna cogoyaw ciyɛnta u bangebagaw fɛ u yɛrɛma sisan. O bɛ an ka sugandilikɛlaw nɔgɔya kosɛbɛ ani fɛn minnu bɛ se ka kɛ ka kɛɲɛ ni mɔgɔw sago ye. - A tɔgɔ jiginna
.table-condensed
ka kɛ walasa a ka.table-sm
kɛ cogo kelen na. .table-inverse
A ye sugandi kura dɔ fara a kan .- Tabali kuncɛlanw sɛmɛntiyalanw farala a kan:
.thead-default
ani.thead-inverse
. - A tɔgɔ jiginna contextual classes la walasa ka
.table-
-prefix sɔrɔ. o de kama.active
,.success
,.warning
,.danger
ani.info
ka.table-active
,.table-success
,.table-warning
,.table-danger
ani.table-info
.
- Eleman min jiginna, o bɛ segin ka kɛ
_reboot.scss
dosiye kɔnɔ. - A tɔgɔ jiginna
.control-label
ka kɛ.col-form-label
. - Tɔgɔ caman tigɛra
.input-lg
ani.input-sm
ka taa.form-control-lg
ani.form-control-sm
, o cogo kelen na. - Kalansow bilala
.form-group-*
nɔgɔya kosɔn. Baara kɛ ni.form-control-*
kalanw ye o nɔ na sisan. - A Dònna
.help-block
k'a Blà a nɔ na ni.form-text
for block-level help text ye. Walasa ka dɛmɛ sɛbɛn inline ani sugandi wɛrɛw sɔrɔ minnu bɛ se ka wuli ka bɔ u nɔ na, baara kɛ ni nafalanw ye i n’a fɔ.text-muted
. - A binna
.radio-inline
ani.checkbox-inline
. - Consolidated
.checkbox
ani.radio
into.form-check
ani.form-check-*
kalasi suguya caman. - Formulaire horizontaux minnu bɛ labɛn kokura:
- A ye
.form-horizontal
kalan wajibiyalen bila. .form-group
tɛ cogoyaw waleya tugun ka bɔ.row
via mixin la, o la.row
sisan a wajibiyalen don grid horizontalw labɛncogo la (misali la,<div class="form-group row">
)..col-form-label
A ye kalasi kura fara a kan vertically center labels kan ni.form-control
s ye.- A ye kura fara a kan
.form-row
for compact form layouts ni grid classes (swap your.row
for a.form-row
ani go).
- A ye
- A farala ladamu sɛbɛnw dɛmɛni kan (ka ɲɛsin jatebɔyɔrɔw, arajow, sugandiliw, ani dosiye dontaw ma).
- A
.has-error
bɛ ,.has-warning
, ani.has-success
kalasiw bila HTML5 foroko sɛgɛsɛgɛli la CSS'w:invalid
ni:valid
pseudo-kalansow fɛ. - A tɔgɔ jiginna
.form-control-static
ka kɛ.form-control-plaintext
.
- A tɔgɔ jiginna
.btn-default
ka kɛ.btn-secondary
. - A ye
.btn-xs
kalasi Dòn pewu i n'a fɔ.btn-sm
a ka dɔgɔ kosɛbɛ ka Tɛmɛ v3 ta kan. - jQuery plugin ka butɔni cogoya min bɛ cogoya la,
button.js
o bɔra. O la,$().button(string)
ani$().button('reset')
fɛɛrɛw fana bɛ yen. An bɛ ladilikan di ka baara kɛ ni JavaScript ladamulen fitinin dɔ ye o nɔ na, min bɛna nafa sɔrɔ ka i yɛrɛ minɛ i b’a fɛ cogo min na tigitigi.- A kɔlɔsi ko plugin in ka fɛn tɔw (butɔnw jatebɔyɔrɔw, butɔni arajow, butɔni kelen-kelenw) maralen bɛ v4 kɔnɔ.
- Butɔnw Changer'
[disabled]
ka kɛ:disabled
i n'a fɔ IE9+ bɛ dɛmɛ:disabled
cogo min na . nkafieldset[disabled]
hali bi a ka kan bawo foroforobaciyɛn nafamaw bɛ buggy hali bi IE11 kɔnɔ .
- A ye component sɛbɛn kokura ni flexbox ye.
- A bɔra
.btn-group-justified
. I n' a fɔ a nɔnabila i bɛ se ka baara kɛ ni<div class="btn-group d-flex" role="group"></div>
a ye i n' a fɔ fɛn minnu bɛ fɛnw lamini ni.w-100
. - A ye
.btn-group-xs
kalan bila pewu ka bɔli kɛ.btn-xs
. - Butɔn kuluw ni ɲɔgɔn cɛ danfara jɛlen bɔ butɔni baarakɛminɛnw kɔnɔ; baara kɛ ni margin utilities ye sisan.
- Sɛbɛn minnu ɲɛnabɔra walasa ka baara kɛ ni yɔrɔ wɛrɛw ye.
- A bε Yεlεma ka Bɔ bangebagaw ka sugandiliw la ka Taa kàlan kelenw na yɔrɔw bɛɛ la, fɛn caman bεε la, a ɲɔgɔnnaw.
- Dropdown styles nɔgɔyalenw walasa u kana ci tugun ni sanfɛla walima dugumalanw ye minnu bɛ nɔrɔ dropdown menu la.
- Dropdowns bɛ se ka jɔ ni
<div>
s walima<ul>
s ye sisan. - Segin-ka-bɔ-cogoyaw ni taamasiyɛnw jɔli walasa ka dɛmɛ nɔgɔman, jɔlen di fɛnw ma minnu bɛ jigin
<a>
ani<button>
minnu sinsinnen bɛ fɛnw kan. - A tɔgɔ jiginna
.divider
ka kɛ.dropdown-divider
. - Fɛn minnu bɛ jigin sisan , olu bɛ ɲini
.dropdown-item
. - Dropdown toggles tɛ ɲɛfɔli jɛlen dɔ wajibiya tugun
<span class="caret"></span>
; nin bɛ di sisan a yɛrɛma CSS'w fɛ::after
on.dropdown-toggle
.
576px
A ye jatebɔlan kura dɔ fara a kan i n' a fɔsm
, o kɔrɔ ye ko sisan jatebɔsen duuru bɛ yen minnu bɛɛ lajɛlen bɛ (xs
,sm
,md
,lg
, anixl
).- A ye jaabi-jaabi-yɔrɔ-ko-ɲɛnabɔli-klasiw tɔgɔ caman Da ka Bɔ
.col-{breakpoint}-{modifier}-{size}
ka.{modifier}-{breakpoint}-{size}
na jatebɔ-kalanso nɔgɔmanw kama. - A ye push ni pull modifier kalanw bila ka ɲɛsin flexbox-powered
order
kalasi kura ma. Misali la,.col-8.push-4
ani nɔ na.col-4.pull-8
, i tun bɛna baara kɛ.col-8.order-2
ni ani.col-4.order-1
. - A ye flexbox utility classes fara a kan grid system ani components kan.
- A ye component sɛbɛn kokura ni flexbox ye.
- A
a.list-group-item
bɛ bila a nɔ na ni kalasi jɛlen ye,.list-group-item-action
, ka ɲɛsin styling link ani button versions ma list group fɛnw na. - Kalanso farala a kan
.list-group-flush
walasa ka baara kɛ ni kartiw ye.
- A ye component sɛbɛn kokura ni flexbox ye.
- Ni an ye 'yɔrɔ Di flexbox ma, a ka c'a la, 'jyɛnnatigɛ-sɛbɛnw 'kɔnɔ 'kɔnɔnafili bɛ Tiɲɛ bari an tɛ baara Kɛ ni flot (floti) ye tugun. Floated content bɛ na fɔlɔ, nka ni flexbox ye o tɛ kɛ tugun. Update i ka dismiss icons ka na kɔfɛ modal titles ka fix.
- Sugandili
remote
(min tun bɛ se ka kɛ ka kɛnɛma kɔnɔkow doni a yɛrɛma ani k’u pikiri modal kɔnɔ) ani ko kɛlen min bɛ bɛn o maloaded.bs.modal
, olu bɔra. An bɛ ladilikan di o nɔ na ka baara kɛ ni kliyan fan fɛ jatebɔlan ye walima kunnafoni sirili karamɔgɔ ye, walima ka jQuery.load wele i yɛrɛ ye.
- A ye component sɛbɛn kokura ni flexbox ye.
- A ye sugandiliw bɛɛ lajɛlen bila ka surunya
>
walasa ka cogoya nɔgɔman sɔrɔ kalanw fɛ minnu tɛ nested ye. - HTML-kɛrɛnkɛrɛnnenya la sugandiliw nɔ na i n’a fɔ
.nav > li > a
, an bɛ baara Kɛ ni kalasi danfaralenw ye.nav
s,.nav-item
s ani.nav-link
s kama. O b’a To i ka HTML bɛ Se ka Labɛn ka Tɛmɛ k’a sɔrɔ a bɛ na ni dɔ farali ye.
Navbar sɛbɛnna kokura pewu flexbox kɔnɔ ni dɛmɛ ɲɛnabɔlen ye ɲɔgɔndɛmɛ, jaabiw, ani mɔgɔw labɛnni na.
- Navbar kɛcogo minnu bɛ jaabi di, olu bɛ waleya sisan
.navbar
kalasi la wajibiyalen.navbar-expand-{breakpoint}
fɛ i bɛ yɔrɔ min sugandi i bɛ navbar dabɔ yɔrɔ min na. Fɔlɔ nin tun ye Less variable modification ye wa a tun bɛ recompiling (daɲɛw labɛncogo kura) de wajibiya. .navbar-default
ye sisan.navbar-light
, hali ni.navbar-dark
a bɛ to a cogo la. Olu dɔ wajibiyalen don navbar kelen-kelen bɛɛ kan. Nka, o kalasi ninnu tɛ s sigi tugunbackground-color
; o nɔ na u jɔyɔrɔba ye nɔ bila dɔrɔncolor
.- Navbarw bɛ ɲini sisan kɔkanna fɔli sugu dɔ la. Sugandili kɛ an ka kɔkanna nafalanw na (
.bg-*
) walima ka i yɛrɛ ta sigi ni yeelen/inverse classes ye sanfɛ for mad customization . - Ni flexbox cogoyaw dira, navbarw bɛ se ka baara kɛ sisan ni flexbox nafalanw ye walasa ka ɲɔgɔndan sugandiliw nɔgɔya.
.navbar-toggle
ye sisan.navbar-toggler
ani a cogoyaw ni kɔnɔna taamasiyɛnw tɛ kelen ye (<span>
s saba tɛ tɛmɛ).- A ye
.navbar-form
kalan bila pewu. A tɛ wajibiya tugun; o nɔ na, baara kɛ dɔrɔn ni.form-inline
margin utilities ye ani ka baara kɛ ni a ye i n’a fɔ a mago bɛ cogo min na. - Navbars tɛ don a kɔnɔ tugun
margin-bottom
walimaborder-radius
ka da a kan. Baara kɛ ni nafamafɛnw ye i n’a fɔ a mago bɛ cogo min na. - Misali bɛɛ minnu bɛ navbarw jira, olu b’u sɛmɛntiya walasa ka taamasiyɛn kuraw don u kɔnɔ.
- A ye component sɛbɛn kokura ni flexbox ye.
- Kalanso jɛlenw (
.page-item
,.page-link
) wajibiyalen don sisan.pagination
s bɔnsɔnw kan - A ye
.pager
component (yɔrɔ) Dòn pewu i n'a fɔ a tùn ka dɔgɔ dɔɔnin ni customized outline buttons (labɛncogo butɔni) ye.
- Kalanso jɛlen dɔ,
.breadcrumb-item
, bɛ ɲini sisan.breadcrumb
s bɔnsɔnw kan
- Consolidée
.label
ani.badge
ka disambiguate ka bɔ<label>
element ani ka nɔgɔya components relatifs. - A bɛ fara a kan
.badge-pill
i n’a fɔ fɛn min bɛ fɛn caman sɛmɛntiya “furakisɛ” ɲɛda lamininen na. - Badgew tɛ wuli u yɛrɛma tugun lisi kuluw kɔnɔ ani yɔrɔ wɛrɛw la. Nafama kalanw de wajibiyalen don sisan o kama.
.badge-default
a bɔra ka.badge-secondary
fara a kan walasa ka bɛn component modifier classes ma minnu bɛ kɛ yɔrɔ wɛrɛw la.
A filila pewu karti kura yɔrɔ kama.
.panel
ka.card
, sisan a jɔlen bɛ ni flexbox ye..panel-default
bɔlen don ani a tɛ se ka bila a nɔ na..panel-group
bɔlen don ani a tɛ se ka bila a nɔ na..card-group
tɛ a nɔnabila ye , a tɛ kelen ye ..panel-heading
fɛ.card-header
.panel-title
ka.card-title
. Ka kɛɲɛ ni filɛli ɲininen ye, i bɛ se fana ka baara kɛ ni kuncɛyɔrɔw walima kalasiw ye (misali<h3>
la ,.h3
) walima ni sɛbɛnniw walima kalasi jɛmanw ye (misali<strong>
la ,<b>
,.font-weight-bold
). A kɔlɔsi ko.card-title
, hali ni a tɔgɔ bɛ o cogo kelen na, a bɛ ɲɛda cogoya wɛrɛ lase ni.panel-title
..panel-body
fɛ.card-body
.panel-footer
fɛ.card-footer
.panel-primary
,.panel-success
,.panel-info
,.panel-warning
, ani.panel-danger
u bɔra.bg-
,.text-
, ani.border
nafalanw kama minnu bɔra an ka$theme-colors
Sass karti la.
- A ye contextual
.progress-bar-*
classes (dakunw ka kalanw) bila u nɔ na ni.bg-*
nafalanw ye. Misali la,class="progress-bar progress-bar-danger"
a bɛ kɛclass="progress-bar bg-danger"
. - A bɛ wuli
.active
ka ɲɛsin ɲɛtaa baraw ɲɛnamaw ma ni.progress-bar-animated
.
- A ye a yɔrɔ bɛɛ labɛn kokura walasa ka dilancogo n’a kɛcogo nɔgɔya. An bɛ cogoya caman sɔrɔ i bolo ka tɛmɛ, taamasiyɛn kuraw, ani taamasiyɛn kuraw.
- CSS bɛɛ kɛra un-nested ye ani tɔgɔ caman wɛrɛw kɛra, k’a jira ko kalasi kelen-kelen bɛɛ bɛ daminɛ ni
.carousel-
.- Karɔsi fɛnw kama,
.next
,.prev
,.left
, ani.right
bɛ sisan.carousel-item-next
,.carousel-item-prev
,.carousel-item-left
, ani.carousel-item-right
. .item
ye fana sisan.carousel-item
.- For prev/next controls,
.carousel-control.right
and.carousel-control.left
are now.carousel-control-next
and.carousel-control-prev
, o kɔrɔ ye ko u tɛ basigi kalasi kɛrɛnkɛrɛnnen de wajibiya tugun.
- Karɔsi fɛnw kama,
- A ye jaabi cogoya bɛɛ bɔ yen, ka nafalanw bila kɔfɛ (misali la, ka sɛbɛnniw jira filɛlikɛyɔrɔ dɔw kan) ani cogoya ladamulenw i n’a fɔ a mago bɛ cogo min na.
- Jaw bɔlenw bɛ wuli ka bɔ jaw la minnu bɛ carousel fɛnw kɔnɔ, ka bila kɔfɛ ka taa nafamafɛnw na.
- Tweaked Carousel misali la walasa ka markup kura ni cogoyaw don a kɔnɔ.
- A ye dɛmɛ bɔ tabali nested styled la. Tabali cogoyaw bɛɛ bɛ ciyɛn ta sisan v4 kɔnɔ sugandili nɔgɔmanw kama.
- A ye inverse table variant fara a kan.
- A jira, dogolen ani fɛn wɛrɛw:
- A kɛra jiracogo nafamafɛnw ye minnu bɛ jaabi di (misali la,
.d-none
anid-{sm,md,lg,xl}-none
). - a ye nafamafɛnw fanba bɔ jiralan nafamafɛn
.hidden-*
kuraw kama . Misali la, , baara kɛ ni . A ye nafalanw tɔgɔ caman wɛrɛ da walasa ka baara kɛ ni jiracogo nafama tɔgɔdacogo ye. Kunnafoni wɛrɛw bɛ sɔrɔ Responsive utilities yɔrɔ la nin ɲɛ in kan..hidden-sm-up
.d-sm-none
.hidden-print
- A
.float-{sm,md,lg,xl}-{left,right,none}
ye kalanw fara a kan ka ɲɛsin jaabiw ma ani ka bɔ.pull-left
ani.pull-right
kabini u ye redundant ye ka.float-left
ani.float-right
.
- A kɛra jiracogo nafamafɛnw ye minnu bɛ jaabi di (misali la,
- Ka sɛbɛen masin na:
- jaabi caman farala an ka sɛbɛnniw labɛncogo kalanw
.text-{sm,md,lg,xl}-{left,center,right}
kan .
- jaabi caman farala an ka sɛbɛnniw labɛncogo kalanw
- Labɛnni ni ɲɔgɔn cɛ:
- A ye jaabi-marge kura fara a kan ani padding utilities fan bɛɛ fɛ, ka fara vertical ani horizontal shorthands kan.
- A farala kurunba kan flexbox nafamafɛnw kan .
- A jiginna
.center-block
ka taa kalan kura.mx-auto
la.
- Clearfix kurayara walasa ka dɛmɛ bɔ navigatɛri kɔrɔw la.
Bootstrap 3 ka feerekɛlaw ka ɲɛbila mixins, minnu tun ma baara kɛ v3.2.0 kɔnɔ, olu bɔra Bootstrap 4. Kabini an bɛ baara kɛ ni Autoprefixer ye, u tɛ wajibiya tugun.
A ye nin mixin ninnu bɔ : animation
, animation-delay
, animation-direction
, animation-duration
, animation-fill-mode
, , animation-iteration-count
, animation-name
, , animation-timing-function
, backface-visibility
, , box-sizing
, , content-columns
, hyphens
, , opacity
, , perspective
, perspective-origin
, , rotate
, , rotateX
, , rotateY
, scale
, , scaleX
, , scaleY
, skew
, , transform-origin
, , transition-delay
, transition-duration
, , transition-property
, transition-timing-function
, , transition-transform
, translate
, translate3d
,user-select
An ka sɛbɛnw ye 'sèn Sɔrɔ 'sènfɛ-sɛbɛnw 'kɔnɔ fana. Nin ye low down ye:
- An bɛ baara Kɛ ni Jekyll ye halibi, nka an bɛ ni plugins ye mix la:
bugify.rb
bɛ kɛ ka sɛbɛnniw jira ka ɲɛ an ka navigatɔrɔ bugs ɲɛ kan.example.rb
ye fork ladamu ye min bɛhighlight.rb
plugin default la, min bɛ sira Di misali-kode ɲɛnabɔli nɔgɔya ma.callout.rb
ye o ɲɔgɔnna ladamu foroko ye, nka a dabɔra an ka docs kɛrɛnkɛrɛnnenw weleli kama.- jekyll-toc bɛ kɛ ka an ka kɔnɔkow tabali labɛn.
- Docs kɔnɔkow bɛɛ sɛbɛnna kokura Markdown kɔnɔ (HTML nɔ na) walasa ka sɛgɛsɛgɛli nɔgɔya.
- Ɲɛw labɛnna kokura walasa ka kunnafoni nɔgɔmanw sɔrɔ ani ka se ka gɛrɛ ɲɔgɔn na cogo min na.
- An bɔra CSS kɔrɔlen na ka taa SCSS la walasa ka nafa bɛrɛbɛrɛ sɔrɔ Bootstrap ka fɛn caman sɛgɛsɛgɛli la, mixins ani fɛn wɛrɛw.
Yɛlɛma bɛɛ @screen-
bɔra v4.0.0 kɔnɔ. Baara kɛ ni media-breakpoint-up()
, media-breakpoint-down()
, walima media-breakpoint-only()
Sass mixins walima $grid-breakpoints
Sass karti ye o nɔ na.
An ka jaabi-danfara-kalansow bɔra ka caya ka ɲɛsin display
nafamafɛn jɛlenw ma.
- A
.hidden
ni.show
kalasiw Bɔra bawo u ni jQuery's$(...).hide()
ni$(...).show()
fɛɛrɛw bɛ ɲɔgɔn sɔsɔ. O nɔ na, i k’a ɲini ka fɛn in sɛgɛsɛgɛli kɛ[hidden]
walima ka baara kɛ ni inline styles ye i n’a fɔstyle="display: none;"
anistyle="display: block;"
. - Kalanso bɛɛ
.hidden-
bɔra, fo sɛbɛnni nafamafɛnw minnu tɔgɔ jiginna.- A bɔra v3 la:
.hidden-xs
.hidden-sm
.hidden-md
.hidden-lg
.visible-xs-block
.visible-xs-inline
.visible-xs-inline-block
.visible-sm-block
.visible-sm-inline
.visible-sm-inline-block
.visible-md-block
.visible-md-inline
.visible-md-inline-block
.visible-lg-block
.visible-lg-inline
.visible-lg-inline-block
- A bɔra v4 alphas kɔnɔ:
.hidden-xs-up
.hidden-xs-down
.hidden-sm-up
.hidden-sm-down
.hidden-md-up
.hidden-md-down
.hidden-lg-up
.hidden-lg-down
- A bɔra v3 la:
- sɛbɛnnikɛlanw tɛ daminɛ tugun ni
.hidden-
walima.visible-
ye , nka ni.d-print-
.- Tɔgɔ kɔrɔw:
.visible-print-block
,.visible-print-inline
,.visible-print-inline-block
, ..hidden-print
- Kalanso kuraw:
.d-print-block
,.d-print-inline
,.d-print-inline-block
, ..d-print-none
- Tɔgɔ kɔrɔw:
Sanni i ka baara Kɛ ni .visible-*
kalasi jɛlenw ye, i bɛ fɛn dɔ Kɛ fɛn ye min bɛ Ye ni i t’a dogo dɔrɔn o ɛkran hakɛ la. Aw bɛ se ka kalasi kelen .d-*-none
ni kalasi kelen fara ɲɔgɔn kan .d-*-block
walasa ka fɛn dɔ jira dɔrɔn ɛkran hakɛw cɛmancɛ dilen dɔ kan (misali .d-none.d-md-block.d-xl-none
la, a bɛ fɛn jira minɛn cɛmancɛw ni belebelew dɔrɔn kan).
A kɔlɔsi ko bεnkan minnu bε jε ka bεnkansεbεnw ka bεnkanw na v4 kɔnɔ, o kɔrɔ ye ko i bεna Taa bεnkansεbεn kelen na ka bonya walasa ka o jaabi kelenw Sɔrɔ. Nafama-kalasi kura minnu bɛ jaabi di, olu t’a ɲini ka ko minnu man ca, yɔrɔ minnu na, fɛn dɔ yecogo tɛ se ka jira i n’a fɔ filɛlikɛyɔrɔ hakɛw hakɛ kelen min bɛ ɲɔgɔn kan; aw bɛna a ɲini o nɔ na ka baara kɛ ni CSS ladamulen ye o ko suguw la.