Ʋuʋu yi v4
Bootstrap 4 nye dɔ bliboa gbugbɔgaŋlɔ gã aɖe. Woƒo nu tso tɔtrɔ siwo ɖe dzesi wu ŋu kpuie le ete, eye wowɔ tɔtrɔ siwo le tẽ wu ɖe akpa siwo sɔ ŋu.
Ne míeʋu tso Beta 3 yi míaƒe v4.0 ƒe tata si li ke la, tɔtrɔ aɖeke meli si gblẽa nu le eŋu o, gake tɔtrɔ ɖedzesi aɖewo li.
-
Woɖɔ agbalẽtata ƒe dɔwɔnu siwo gblẽ ɖo. Tsã la, klass aɖe zazã
.d-print-*
ana woaɖe asi le klass bubu ɖesiaɖe ŋu le vome.d-*
. Fifia, wosɔ kple míaƒe ɖeɖefia dɔwɔnu bubuawo eye woku ɖe nyadzɔdzɔgblɔmɔ̃ ma ŋu ko (@media print
). -
Wokeke agbalẽtata ƒe ɖeɖefia dɔwɔnu siwo li ɖe enu be woasɔ kple dɔwɔnu bubuwo. Beta 3 kple esiwo wu nenema koe
block
,inline-block
,inline
, kplenone
. Stable v4 kpe ɖeflex
,inline-flex
,table
,table-row
, kpletable-cell
. -
Woɖɔ tata ƒe ŋgɔdonya gɔmeɖeɖe ɖo le web-browserwo dzi kple tata ƒe atsyã yeye siwo gblɔ be
@page
size
.
Togbɔ be Beta 2 kpɔ míaƒe gbagbã ƒe tɔtrɔwo ƒe akpa gãtɔ le beta ƒe akpaa me hã la, gake ʋee aɖewo gakpɔtɔ le mía si siwo wòle be woakpɔ le Beta 3 ƒe tata me. Tɔtrɔ siawo awɔ dɔ ne èle asi trɔm le Beta 3 ŋu tso Beta 2 alo Bootstrap ƒe tɔtrɔ xoxo ɖesiaɖe me.
$thumbnail-transition
Woɖe tɔtrɔ si wometsɔ wɔ dɔe o la ɖa . Míenɔ naneke trɔm o, eyata kɔda bubu koe wònye.- npm package la megatsɔa faɛl bubu aɖeke dea eme o negbe míaƒe dzɔtsoƒe kple dist faɛlwo ko; ne èɖo ŋu ɖe wo ŋu eye nènɔ míaƒe ŋɔŋlɔdzesiwo zãm to
node_modules
agbalẽdzraɖoƒea dzi la, ele be nàtrɔ asi le wò dɔwɔwɔ ŋu.
-
Gbugbɔ ŋlɔ dzesideɖaka siwo wowɔ ɖe ɖoɖo nu kple esiwo woɖo ɖi kple radiowo siaa. Fifia, wo ame evea siaa ƒe HTML ƒe ɖoɖo si sɔ (gota
<div>
kple nɔvi<input>
kple<label>
) kple ɖoɖo ƒe atsyã ɖeka (stacked default, inline with modifier class). Esia na míewɔa atsyã na dzesidea ɖe nusi wotsɔ de eme ƒe nɔnɔme dzi, si naa kpekpeɖeŋunana nɔnɔmea nɔa bɔbɔedisabled
(tsã la, ebia dzila ƒe klass) eye wòdoa alɔ míaƒe agbalẽvi ƒe kpeɖodzinana nyuie wu.Abe esia ƒe akpa aɖe ene la, míetrɔ CSS hena
background-image
s geɖewo dzi kpɔkpɔ le agbalẽvi tɔxɛwo ƒe dzesiɖakawo kple radiowo dzi. Tsã la,.custom-control-indicator
megbe amadede, ʋuʋudedi, kple SVG dzesi nɔa nusi woɖe ɖa fifia la ŋu. Trɔtrɔ ɖe megbenyawo ŋu fia be nàɖɔli wo katã ɣesiaɣi si wòahiã be nàtrɔ ɖeka ko. Fifia, míekpɔe.custom-control-label::before
na fill kple gradient eye.custom-control-label::after
wòkpɔa dzesi la gbɔ.Be nàwɔ dodokpɔ si wowɔ ɖe ɖoɖo nu le fli me la, tsɔ kpe ɖe eŋu
.custom-control-inline
. -
Wotrɔ asi le tiatiawɔla ŋu na abɔta ƒuƒoƒo siwo wotu ɖe nyawo tsɔtsɔ de eme dzi. Le esi teƒe
[data-toggle="buttons"] { }
be míawɔe na atsyã kple nuwɔna la, míezãa nɔnɔmea na JS nuwɔnawo ko eye míeɖoa ŋu ɖe klassdata
yeye aɖe ŋu hena atsyãwɔwɔ..btn-group-toggle
-
Woɖee ɖa
.col-form-legend
tsɔ do alɔ nusi wowɔ wònyo ɖe edzi vie.col-form-label
. Mɔ sia dzi.col-form-label-sm
eye.col-form-label-lg
woate ŋu azãe ɖe<legend>
elementwo dzi bɔbɔe. -
Faɛl ƒe nyawo tsɔtsɔ de eme siwo wowɔ ɖe ɖoɖo nu la xɔ tɔtrɔ ɖe woƒe
$custom-file-text
Sass tɔtrɔ ŋu. Meganye Sass ƒe anyigbatata si wotsɔ ƒo ƒui o eye fifia ka ɖeka koe wònaa ŋusẽ—Browse
bɔt la elabena emae nye alakpa-nu ɖeka kolia si wowɔ tso míaƒe Sass me fifia. FifiaChoose file
nuŋɔŋlɔa tso.custom-file-label
.
-
Input group addons nye woƒe ɖoɖo koŋ fifia ne wotsɔe sɔ kple input aɖe. Míeɖe asi le eŋu
.input-group-addon
eye.input-group-btn
na klass yeye eve,.input-group-prepend
eye.input-group-append
. Ele be nàzã append alo prepend tẽ fifia, si ana míaƒe CSS ƒe akpa gãtɔ nanɔ bɔbɔe. Le kpeɖeŋutɔ alo prepend me la, da wò abɔtawo abe alesi woanɔ le teƒe bubu ɖesiaɖe ene, gake bla nuŋɔŋlɔ ɖe.input-group-text
. -
Wodoa alɔ kpeɖodzi ƒe atsyãwo fifia, abe alesi wole asi kpem ɖe nyawo tsɔtsɔ de eme geɖe ŋu ene (togbɔ be àteŋu aɖo kpe nyawo tsɔtsɔ de eme ɖeka ko dzi le ƒuƒoƒo ɖesiaɖe me hã).
-
Ele be klasswo ƒe lolome nanɔ dzila
.input-group
dzi ke menye ɖekaɖeka ƒe nɔnɔme ƒe akpawo dzi o.
Esi míele beta me la, míeɖoe be tɔtrɔ aɖeke nanɔ mía si wòagbã o. Gake menye ɣesiaɣie nuwo yia edzi abe alesi woɖoe ene o. Le ete la, tɔtrɔ siwo gblẽa nu le susu me ne èle ʋuʋum tso Beta 1 yi Beta 2.
- Woɖe
$badge-color
tɔtrɔɖenu kple eƒe zazã ɖa le.badge
. Míezãa amadede ƒe vovototodedeameme ƒe dɔwɔwɔ tsɔ tiaa a sicolor
wotu ɖebackground-color
, eyata tɔtrɔa mehiã o. - Wotrɔ ŋkɔ na
grayscale()
dɔwɔwɔ begray()
be woaƒo asa na masɔmasɔ kple CSS nativegrayscale
filter la gbãgbã. - Wotrɔ ŋkɔ na
.table-inverse
,.thead-inverse
, kple.thead-default
na.*-dark
kple.*-light
, si sɔ kple míaƒe amadede siwo míezã le teƒe bubuwo. - Fifia kplɔ̃ siwo ɖoa nya ŋu la wɔa klasswo na grid ƒe gbagbãƒe ɖesiaɖe. Esia gblẽa nu le Beta 1 ŋu le mɔ sia nu be
.table-responsive
esi nèzãna la le abe.table-responsive-md
. Àte ŋu azãe azɔ.table-responsive
alo.table-responsive-{sm,md,lg,xl}
ne ehiã. - Woɖe asi le Bower ƒe kpekpeɖeŋu ŋu elabena woɖe asi le package dzikpɔla ŋu na mɔnu bubuwo (le kpɔɖeŋu me, Yarn alo npm). Kpɔ bower/bower#2298 hena numeɖeɖe bubuwo.
- Bootstrap gakpɔtɔ hiã jQuery 1.9.1 alo esi wu nenema, gake woɖo aɖaŋu na wò be nàzã version 3.x elabena v3.x ƒe browser siwo wodoa alɔe nye esiwo Bootstrap doa alɔ kpe ɖe v3.x ŋu la, dedienɔnɔ ŋuti ɖɔɖɔɖo aɖewo le wo ŋu.
.form-control-label
Woɖe klass si wometsɔ wɔ dɔe o la ɖa. Ne èwɔ klass sia ŋudɔ la, enye klass la ƒe duplicate.col-form-label
si vertically centered a<label>
kple it's associated input in horizontal form layouts.- Trɔ la
color-yiq
tso mixin si mecolor
nunɔamesi la le me va zu dɔwɔwɔ si trɔa asixɔxɔ aɖe, si na be nàte ŋu azãe na CSS nunɔamesi ɖesiaɖe. Le kpɔɖeŋu me, le esi teƒecolor-yiq(#000)
be nàŋlɔcolor: color-yiq(#000);
.
- Woto
pointer-events
zazã yeye vɛ le modals dzi. Gotagome.modal-dialog
la toa nudzɔdzɔwo me kplepointer-events: none
na custom click handling (si wɔnɛ be wòanya wɔ be nàɖo to ɖe ko dzi.modal-backdrop
na clicks ɖesiaɖe), eye emegbe wòtsia tre ɖe eŋu na ŋutɔŋutɔ.modal-content
kplepointer-events: auto
.
Tiketi gã siwo nàdi be yeanya ne èle ʋuʋum tso v3 yi v4 dzi lae nye esi.
- Woɖe asi le IE8, IE9, kple iOS 6 ƒe kpekpeɖeŋu ŋu. v4 nye IE10+ kple iOS 7+ ko fifia. Le nyatakakadzraɖoƒe siwo hiã esiawo dometɔ ɖeka gome la, zã v3.
- Wotsɔ dziɖuɖua ƒe kpekpeɖeŋu kpe ɖe Android v5.0 Lollipop ƒe Browser kple WebView ŋu. Android Browser kple WebView ƒe tata siwo do ŋgɔ la gakpɔtɔ nye esiwo ŋu womewɔa dɔ le le se nu o ko.
- Flexbox la le dɔ wɔm le gɔmedzedzea me. Le goawo katã me la, esia fia be míadzo le floats kple geɖe wu le míaƒe akpawo dzi.
- Wotrɔ tso Less yi Sass na míaƒe dzɔtsoƒe CSS faɛlwo.
- Wotrɔ tso
px
yirem
abe míaƒe CSS ƒe akpa gbãtɔ ene, togbɔ be wogazãa pikselwo kokoko na media biabia kple grid ƒe nuwɔna elabena mɔ̃ ƒe nukpɔkpɔwo mekpɔa ŋusẽ ɖe ƒomevi ƒe lolome dzi o hã. - Xexeame katã ƒe nuŋɔŋlɔ ƒe lolome dzi ɖe edzi tso
14px
va ɖo16px
. - Wotrɔ asi le grid tiers ŋu be woatsɔ tiatia atɔ̃lia akpe ɖe eŋu (woaɖo adrɛs na mɔ̃ suewo le
576px
kple ete) eye woɖe-xs
infix ɖa le klass mawo me. Kpɔɖeŋu:.col-6.col-sm-4.col-md-3
. - Wotsɔ tiatia siwo woate ŋu atrɔ asi le to SCSS tɔtrɔwo dzi (le kpɔɖeŋu me,
$enable-gradients: true
) ɖɔ li tiatia ƒe tanya si le vovo la. - Woɖɔ ɖoɖo ɖo be woazã npm ŋɔŋlɔdzesi siwo kplɔ wo nɔewo ɖo ɖe Grunt teƒe. Kpɔ
package.json
ŋɔŋlɔdzesiwo katã, alo míaƒe dɔa readme na nutoa me ŋgɔyiyi ƒe hiahiãwo. - Womegadoa alɔ Bootstrap zazã si mewɔa dɔ nyuie o.
- Woɖe asi le Internet dzi Customizer la ŋu tsɔ do alɔ ɖoɖowɔɖi ŋuti nuŋlɔɖi siwo keke ta wu kple xɔtuɖoɖo siwo wowɔ ɖe ɖoɖo nu.
- Wotsɔ dɔwɔnu ƒe hatsotso yeye gbogbo aɖewo kpe ɖe eŋu na CSS ƒe nunɔamesi-asixɔxɔ eve siwo bɔ kple margin/padding dometsotso ƒe mɔ kpuiwo.
- Woʋu yi flexbox me.
- Wotsɔ kpekpeɖeŋu kpe ɖe flexbox ŋu le grid mixins kple klass siwo woɖo do ŋgɔ me.
- Abe flexbox ƒe akpa aɖe ene la, kpekpeɖeŋunana le tsitrenu kple tsia dzi ƒe ɖoɖowɔwɔ ƒe klasswo hã le eme.
- Wowɔ grid ƒe klass ŋkɔwo yeyee kple grid ƒe tier yeye.
sm
Wotsɔ grid tier yeye kpe ɖe eŋu le ete768px
hena granular dziɖuɖu geɖe wu. Fifia laxs
,sm
, ,md
,lg
, kplexl
. Esia hã fia be woƒo tier ɖesiaɖe ɖe dzi dzidzenu ɖeka (eyata.col-md-6
le v3 me la, ele.col-lg-6
v4 me fifia).xs
wotrɔ asi le grid klasswo ŋu be woagabia tso infix la si be wòaɖee afia wòade pɛpɛpɛ wu be wodze atsyãwo zazã gɔme lemin-width: 0
eye menye le pixel ƒe asixɔxɔ si woɖo dzi o. Le esi teƒe be.col-xs-6
, fifia.col-6
. Grid tiers bubuwo katã hiã infix (le kpɔɖeŋu me,sm
).
- Wotrɔ asi le grid ƒe lolomewo, mixins, kple tɔtrɔwo ŋu.
- Sass ƒe anyigbatata le grid gutters si azɔ ale be nàte ŋu agblɔ gutter ƒe kekeme tɔxɛwo le breakpoint ɖesiaɖe.
- Wotrɔ asi le grid mixins ŋu be woazã
make-col-ready
prep mixin kple amake-col
atsɔ aɖoflex
kplemax-width
na sɔti ɖekaɖekawo ƒe lolome. - Wotrɔ grid system media biabia breakpoints kple container widths be woabu akɔnta na grid tier yeye eye woakpɔ egbɔ be sɔtiwo le mama sɔsɔe to
12
le woƒe max width. - Wokpɔa grid breakpoints kple container widths gbɔ azɔ to Sass maps (
$grid-breakpoints
kple$container-max-widths
) dzi ɖe tɔtrɔ vovovo ʋee aɖewo teƒe. Esiawo xɔna ɖe@screen-*
tɔtrɔawo teƒe keŋkeŋ eye woɖea mɔ na wò be nàtrɔ asi le grid tiers la ŋu bliboe. - Nyadzɔdzɔgblɔmɔnuwo ƒe nyabiasewo hã trɔ. Le esi teƒe be míagbugbɔ míaƒe nyadzɔdzɔgblɔmɔnuwo biabia ƒe gbeƒãɖeɖewo agblɔ kple asixɔxɔ ɖeka ɣesiaɣi la,
@include media-breakpoint-up/down/only
. Fifia, le esi teƒe be nàŋlɔ nu@media (min-width: @screen-sm-min) { ... }
la, àte ŋu aŋlɔ nu@include media-breakpoint-up(sm) { ... }
.
- Woda akpa aɖewo, nɔnɔmetata suewo, kple vudowo hena akpa yeye si ƒo nusianu ta, si nye kaɖiwo .
- Woɖe Glyphicons ƒe dzesi ƒe nuŋɔŋlɔa ɖa. Ne èhiã nɔnɔmetatawo la, tiatia aɖewoe nye:
- Glyphicons ƒe akpa si le dziƒo
- Octicons ƒe ƒuƒoƒo
- Font Dziŋɔ ŋutɔ
- Kpɔ axa si nye Keke Ðe Edzi hena mɔnu bubuwo ƒe xexlẽdzesiwo. Ðe aɖaŋuɖoɖo bubuwo le asiwòa? Taflatse ʋu tata alo PR aɖe.
- Woɖe asi le Affix jQuery ƒe kpeɖeŋutɔa ŋu.
- Míele aɖaŋu ɖom be nàzãe
position: sticky
boŋ. Kpɔ HTML5 Taflatse nuŋɔŋlɔa hena nyatakakawo kple polyfill ƒe aɖaŋuɖoɖo tɔxɛwo. Aɖaŋuɖoɖo ɖekae nye be woazã@supports
se aɖe atsɔ awɔ dɔe (le kpɔɖeŋu me,@supports (position: sticky) { ... }
)/ . - Ne èle Affix zãm tsɔ nɔ bubu siwo menye
position
atsyãwo o zãm la, ɖewohĩ polyfills la mado alɔ wò zazã ƒe nya la o. Tiatia ɖeka si woate ŋu azã aleae nye ame etɔ̃lia ƒe ScrollPos-Styler agbalẽdzraɖoƒe.
- Míele aɖaŋu ɖom be nàzãe
- Woɖe asi le pager ƒe akpaa ŋu elabena le nyateƒe me la, enye abɔta siwo wowɔ ɖe ɖoɖo nu vie.
- Wogbugbɔ trɔ asi le akpaawo katã kloe ŋu be woazã klass tiatiawɔla siwo mewɔ ɖeka o geɖe wu ɖe ɖeviwo ƒe tiatiawɔnu siwo le tẽ akpa teƒe.
Ŋkɔ sia ɖe tɔtrɔ vevi siwo wowɔ le akpa aɖe nu le v3.xx kple v4.0.0 dome la fia.
Yeye le Bootstrap 4 me enye Reboot , atsyã yeye si wotu ɖe Normalize dzi kple mía ŋutɔwo ƒe nukpɔsusu aɖewo gbugbɔgaɖɔɖo atsyãwo. Tiatiawɔla siwo dze le faɛl sia me zãa nusiwo le eme ko—klas aɖeke mele afisia o. Esia ɖea míaƒe reset atsyãwo ɖe vovo tso míaƒe akpa ƒe atsyãwo gbɔ hena modular mɔnu si sɔ gbɔ wu. Resets vevi aɖewo siwo le esia me enye box-sizing: border-box
tɔtrɔ, ʋuʋu tso units em
dzi rem
le element geɖewo dzi, kadodo ƒe atsyãwo, kple form element reset geɖewo.
- Woɖe dɔwɔnuawo katã
.text-
yi_utilities.scss
faɛl la me. - Woɖe
.page-header
asi le eŋu abe alesi woate ŋu awɔ eƒe atsyãwo ŋudɔ to utilities dzi ene. .dl-horizontal
woɖe asi le eŋu. Ke boŋ zã.row
on<dl>
eye nàzã grid column classes (alo mixins) ɖe eƒe<dt>
kple<dd>
ɖeviwo dzi.- Wogbugbɔ trɔ asi le blockquotes ŋu, woɖe woƒe atsyãwo tso
<blockquote>
element la me yi klass ɖeka me,.blockquote
. Woɖe.blockquote-reverse
asi le nuŋɔŋlɔ ƒe dɔwɔnuwo ƒe tɔtrɔɖenu ŋu. .list-inline
fifia bia tso viawo si be woaŋlɔ nuawo ɖi na.list-inline-item
klass yeyea nawɔ dɔ ɖe wo dzi.
- Wotrɔ ŋkɔ
.img-responsive
nɛ be.img-fluid
. - Wotrɔ ŋkɔ
.img-rounded
nɛ be.rounded
- Wotrɔ ŋkɔ
.img-circle
nɛ be.rounded-circle
- Woɖe tiatiawɔla ƒe kpɔɖeŋuwo katã kloe
>
ɖa, si fia be kplɔ̃ siwo wotsɔ ƒo ƒui la anyi atsyãwo dome le wo ɖokui si tso wo dzilawo gbɔ azɔ. Esia na míaƒe tiatiawɔnuwo kple nusiwo míate ŋu atrɔ asi le wo ŋu la nɔa bɔbɔe ŋutɔ. - Wotrɔ ŋkɔ
.table-condensed
nɛ be.table-sm
wòawɔ ɖeka. .table-inverse
Wotsɔ tiatia yeye aɖe kpee .- Wotsɔ kplɔ̃ ƒe tanya ƒe tɔtrɔwo kpe ɖe eŋu:
.thead-default
kple.thead-inverse
. - Wotrɔ ŋkɔ na nya siwo ƒo xlãe ƒe klasswo be
.table-
-ŋgɔgbe nanɔ wo ŋu. Eyata.active
,.success
,.warning
,.danger
kple.info
na.table-active
,.table-success
,.table-warning
,.table-danger
kple.table-info
.
- Element si woɖe la gbugbɔ ɖoa
_reboot.scss
faɛl la me. - Wotrɔ ŋkɔ
.control-label
nɛ be.col-form-label
. - Wotrɔ ŋkɔ na
.input-lg
wo kple.input-sm
to.form-control-lg
kple.form-control-sm
, ɖe wo nɔewo yome. - Woɖe
.form-group-*
asi le klasswo ŋu le nuwɔwɔ bɔbɔe ta. Zã.form-control-*
klasswo boŋ fifia. - Woɖee
.help-block
ɖa eye wotsɔ.form-text
for block-level help text ɖo eteƒe. Ne èdi kpekpeɖeŋu nuŋɔŋlɔ si le fli me kple tiatia bubu siwo te ŋu trɔna bɔbɔe la, zã dɔwɔnu ƒe klasswo abe.text-muted
. - Wodae
.radio-inline
ɖe anyi eye.checkbox-inline
. - Woƒo ƒu
.checkbox
kple.radio
ɖe kple klass.form-check
vovovoawo ..form-check-*
- Wogbugbɔ trɔ asi le nɔnɔme siwo le tsia dzi ŋu:
- Woɖe asi le
.form-horizontal
klass ƒe nudidi la ŋu. .form-group
megawɔa atsyãwo ŋudɔ tso.row
via mixin me o, eyata.row
fifia ehiã na horizontal grid ɖoɖowo (le kpɔɖeŋu me,<div class="form-group row">
)..col-form-label
Wotsɔ klass yeye kpe ɖe vertically center labels ŋu kple.form-control
s.- Wotsɔ yeye kpe ɖe eŋu
.form-row
na compact form layouts kple grid classes (trɔ wò.row
ɖe a.form-row
kple yi).
- Woɖe asi le
- Wotsɔ agbalẽvi siwo wowɔ ɖe ɖoɖo nu ƒe kpekpeɖeŋu kpe ɖe eŋu (na dzesiɖakawo, radiowo, tiatiawo, kple faɛlwo ƒe nyawo tsɔtsɔ de eme).
- Woɖɔli
.has-error
,.has-warning
, kple.has-success
klasswo kple HTML5 nuŋlɔɖi ƒe kpeɖodzi to CSS's:invalid
kple:valid
pseudo-klaswo dzi. - Wotrɔ ŋkɔ
.form-control-static
nɛ be.form-control-plaintext
.
- Wotrɔ ŋkɔ
.btn-default
nɛ be.btn-secondary
. - Woɖe asi le
.btn-xs
klass la ŋu keŋkeŋ abe alesi.btn-sm
wòle sue wu v3 tɔ ene le agbɔsɔsɔ me. - Woɖe asi le jQuery ƒe kpeɖeŋutɔ ƒe nɔnɔme ƒe abɔta ƒe nɔnɔme ŋu.
button.js
Esia lɔ$().button(string)
kple$().button('reset')
mɔnuwo ɖe eme. Míeɖo aɖaŋu be nàzã JavaScript si wowɔ ɖe ɖoɖo nu ƒe akpa sue aɖe boŋ, si aɖe vi na wò be nàwɔ nu abe ale si tututu nèdi ene.- De dzesii be wolé plugin la ƒe akpa bubuawo (button checkboxes, button radios, single-toggle buttons) ɖe v4 me.
- Trɔ buttons'
[disabled]
na:disabled
abe alesi IE9+ doa alɔe:disabled
ene . Ke hãfieldset[disabled]
egahiã kokoko elabena native disabled fieldsets gakpɔtɔ nye buggy le IE11 me.
- Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
- Woɖee ɖa
.btn-group-justified
. Abe nusi woatsɔ aɖo eteƒe ene la, àte ŋu azãe<div class="btn-group d-flex" role="group"></div>
abe nusi blaa nu ɖe nusiwo ŋu.w-100
. - Woɖe asi le
.btn-group-xs
klass la ŋu keŋkeŋ na woɖee ɖa le.btn-xs
. - Woɖe dometsotso si dze ƒã le abɔta ƒe ƒuƒoƒowo dome ɖa le abɔta ƒe dɔwɔnuwo me; zã margin utilities fifia.
- Nuŋlɔɖi siwo nyo wu be woazã kple akpa bubuwo.
- Wotrɔ tso dzila tiatiawɔlawo gbɔ yi ɖekaɖeka ƒe hatsotsowo me na akpawo katã, tɔtrɔwo, kple bubuawo.
- Atsyã siwo le bɔbɔe siwo wotsɔna tsia dzi be womagaɖo wo ɖe amewo o eye wotsɔ aŋutrɔ siwo dze ŋgɔ dzi alo yi anyime kpe ɖe nu siwo le tsia dzi la ŋu.
- Woateŋu atu dropdowns kple
<div>
s alo<ul>
s fifia. - Wogbugbɔ tu atsyã siwo le tsia dzi kple dzesidede nu be woana kpekpeɖeŋu bɔbɔe, si wotu ɖe eme na nusiwo le tsia dzi
<a>
kple esiwo<button>
wotu ɖe wo dzi. - Wotrɔ ŋkɔ
.divider
nɛ be.dropdown-divider
. - Nusiwo wotsɔna ƒua gbe fifia bia be
.dropdown-item
. - Dropdown toggles megahiã be woawɔ explicit
<span class="caret"></span>
; wotsɔ esia na le eɖokui si fifia to CSS's::after
dzi le.dropdown-toggle
.
576px
Wotsɔ grid breakpoint yeye kpee abesm
, si fia be fifia tiers atɔ̃ siwo katã le ƒuƒoƒo me (xs
,sm
,md
,lg
, kplexl
).- Wotrɔ ŋkɔ na responsive grid modifier classes tso
.col-{breakpoint}-{modifier}-{size}
yi.{modifier}-{breakpoint}-{size}
na grid classes bɔbɔewo. - Woɖe asi le push kple pull modifier klasswo ŋu na flexbox-powered
order
klass yeyeawo. Le kpɔɖeŋu me, le esi teƒe be nàzã.col-8.push-4
kple ..col-4.pull-8
.col-8.order-2
.col-4.order-1
- Wotsɔ flexbox utility klasswo kpe ɖe eŋu na grid system kple akpawo.
- Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
- Wotsɔ
a.list-group-item
klass si me kɔ,.list-group-item-action
, ɖɔ li na atsyã ƒe kadodo kple abɔta ƒe tɔtrɔwo le xexlẽdzesi ƒuƒoƒo ƒe nuawo me. - Wotsɔ
.list-group-flush
klass kpe ɖe eŋu be woazã kple agbalẽviwo.
- Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
- Ne wona ʋuʋu yi flexbox la, anɔ eme be woaɖe asi le dzesiwo ƒe ɖoɖowɔwɔ ɖe tanya la me ŋu elabena míegazãa floats o. Floated content ye nye gbãtɔ, gake le flexbox gome la, ema meganɔa nenema o. Trɔ asi le wò dɔmeɖeɖe ƒe dzesiwo ŋu be woava le modal tanyawo megbe be woaɖɔ wo ɖo.
- Woɖe
remote
tiatia (si woateŋu azã atsɔ atsɔ gotagomenyawo ade modal me le wo ɖokui si ahade wo me) kpleloaded.bs.modal
nudzɔdzɔ si sɔ kplii la ɖa. Míele aɖaŋu ɖom be nàzã client-side templating alo data binding framework boŋ, alo nàyɔ jQuery.load ɖokuiwò.
- Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
- Woɖe asi le tiatiawɔlawo katã kloe ŋu
>
hena atsyãwɔwɔ bɔbɔe wu to klass siwo me womewɔa atɔ ɖo o dzi. - Le HTML-koŋ ƒe tiatiawɔnuwo abe
.nav > li > a
, teƒe la, míezãa klass vovovowo na.nav
s,.nav-item
s, kple.nav-link
s. Esia nana wò HTML la te ŋu trɔna ɖe nɔnɔmewo ŋu wu esime wòhea kekeɖenudɔwɔwɔ si dzina ɖe edzi vɛ.
Wogbugbɔ ŋlɔ navbar la keŋkeŋ le flexbox me kple kpekpeɖeŋu si nyo wu na ɖoɖowɔwɔ, ŋuɖoɖo, kple tɔtrɔ ɖe nɔnɔmewo ŋu.
- Wowɔa navbar ƒe nuwɔna siwo ɖoa nya ŋu la ŋudɔ azɔ ɖe
.navbar
klass la ŋu to afisi wobia tso asiwò.navbar-expand-{breakpoint}
le afisi nàtia afisi nàgbã navbar la le. Tsã la, esia nye Less variable ƒe tɔtrɔ eye wòbia be woagbugbɔ aƒo ƒui. .navbar-default
nye fifia.navbar-light
, togbɔ be.navbar-dark
egakpɔtɔ le nenema hã. Wobiaa esiawo dometɔ ɖeka le navbar ɖesiaɖe dzi. Gake hatsotso siawo megaɖoabackground-color
s o; ke boŋ ɖeko wokpɔa ŋusẽ ɖecolor
.- Navbarwo bia azɔ be woawɔ megbenya aɖe ƒomevi. Tia tso míaƒe megbe dɔwɔnuwo (
.bg-*
) alo ɖo tɔwò kple kekeli/inverse klass siwo le etame na mad customization . - Ne wona flexbox ƒe atsyãwo la, navbarwo ateŋu azã flexbox dɔwɔnuwo azɔ hena ɖoɖowɔwɔ ƒe tiatia bɔbɔewo.
.navbar-toggle
nye fifia eye atsyã vovovowo kple dzesi ememetɔ le esi ( s.navbar-toggler
etɔ̃ megali o ).<span>
- Woɖe asi le
.navbar-form
klass la ŋu keŋkeŋ. Megahiã o; ke boŋ zã.form-inline
margin utilities ko eye nàwɔ wo ŋudɔ alesi wòhiãe. - Navbars megadea eme
margin-bottom
aloborder-radius
le gɔmedzedzea me o. Zã dɔwɔnu siwo wozãna tsɔ wɔa dɔe ne ehiã. - Wotrɔ asi le kpɔɖeŋu siwo katã ɖe navbarwo fia ŋu be woatsɔ dzesi yeyewo ade eme.
- Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
- Fifia wobia be woatsɔ klass siwo me kɔ (
.page-item
, ) aɖo s ƒe dzidzimeviwo dzi.page-link
.pagination
- Woɖe
.pager
akpaa ɖa keŋkeŋ elabena menye nu boo aɖeke wu ɖoɖowɔɖi ƒe abɔta siwo wowɔ ɖe ɖoɖo nu o.
- Wobiaa klass si me kɔ,
.breadcrumb-item
, fifia ɖe.breadcrumb
s ƒe dzidzimeviwo dzi
- Woƒo wo nu ƒu
.label
eye.badge
woaɖe nya siwo me mekɔ o ɖa le<label>
element la ŋu eye woawɔ akpa siwo do ƒome kplii la bɔbɔe. - Wotsɔe kpe ɖe eŋu
.badge-pill
abe tɔtrɔ ene na “atikekui” ƒe dzedzeme si le goglo. - Womegatsɔa akɔtagbalẽviwo ƒua gbe le wo ɖokui si le xexlẽdzesiwo ƒe ƒuƒoƒowo kple akpa bubuwo me o. Wobiaa nuzazãwo ƒe klasswo fifia hena ema.
.badge-default
woɖe asi le eŋu eye.badge-secondary
wotsɔe kpe ɖe eŋu be wòasɔ kple component modifier class siwo wozã le teƒe bubuwo.
Woɖe asi le eŋu keŋkeŋ na kaɖi ƒe akpa yeyea.
.panel
to.card
, si wotsɔ flexbox tu fifia..panel-default
woɖee ɖa eye womegaɖɔli ame aɖeke o..panel-group
woɖee ɖa eye womegaɖɔli ame aɖeke o..card-group
menye nusi woatsɔ aɖo eteƒe o, ke boŋ eto vovo..panel-heading
yi.card-header
.panel-title
be.card-title
. Le dzedzeme si nèdi nu la, àte ŋu azã tanya ƒe akpawo alo klasswo hã (le kpɔɖeŋu me<h3>
,.h3
) alo nuŋɔŋlɔ dzẽwo alo klasswo (le kpɔɖeŋu me<strong>
,<b>
,.font-weight-bold
). De dzesii be.card-title
togbɔ be wotsɔ ŋkɔ nɛ nenema ke hã la, enaa dzedzeme to vovo na.panel-title
..panel-body
yi.card-body
.panel-footer
yi.card-footer
.panel-primary
,.panel-success
,.panel-info
,.panel-warning
, eye.panel-danger
woɖe asi le wo ŋu na.bg-
,.text-
, kple.border
dɔwɔnu siwo wowɔ tso míaƒe$theme-colors
Sass anyigbatata dzi.
- Wotsɔ dɔwɔnu siwo ŋu viɖe le ɖɔ li nya siwo ƒo xlãe
.progress-bar-*
ƒe klasswo.bg-*
. Le kpɔɖeŋu me,class="progress-bar progress-bar-danger"
eva zuaclass="progress-bar bg-danger"
. - Woɖɔli
.active
ŋgɔyiyi ƒe dzesi siwo me agbe le kple.progress-bar-animated
.
- Wotrɔ asi le akpa bliboa ŋu be wòana atsyã kple atsyã nanɔ bɔbɔe. Atsyã ʋɛ aɖewo koe le mía si na wò be nàɖe asi le wo ŋu, dzesi yeyewo, kple dzesi yeyewo.
- Woɖe CSS katã ɖa eye wotrɔ ŋkɔ na wo, si na wokpɔ egbɔ be wotsɔ
.carousel-
.- Le carousel nuawo gome la
.next
, ,.prev
,.left
, eye.right
wole fifia.carousel-item-next
,.carousel-item-prev
,.carousel-item-left
, kple.carousel-item-right
. .item
hã nye fifia.carousel-item
.- Le prev/next dziɖuɖuwo gome la,
.carousel-control.right
eye.carousel-control.left
wole fifia.carousel-control-next
kple.carousel-control-prev
, si fia be womegahiã gɔmeɖoanyi ƒe hatsotso tɔxɛ aɖe o.
- Le carousel nuawo gome la
- Woɖe atsyã siwo katã ɖoa nya ŋu ɖa, hehe ɖe megbe na dɔwɔnuwo (le kpɔɖeŋu me, woɖe nuŋɔŋlɔwo fia le nukpɔkpɔ aɖewo dzi) kple atsyã tɔxɛwo abe alesi wòhiã ene.
- Woɖe nɔnɔmetatawo ƒe tsɔtsɔke ɖa na nɔnɔmetatawo le carousel nuawo me, hehe ɖe megbe na dɔwɔnuwo.
- Wotrɔ asi le Carousel ƒe kpɔɖeŋua ŋu be woatsɔ dzesi yeyea kple atsyãwo ade eme.
- Woɖe kpekpeɖeŋu si wowɔ na kplɔ̃ siwo woɖo ɖe ɖoɖo nu la ɖa. Wonyi kplɔ̃ ƒe atsyãwo katã ƒe dome fifia le v4 me na tiatiawɔnu bɔbɔewo.
- Wotsɔ inverse kplɔ̃ ƒe tɔtrɔ kpe ɖe eŋu.
- Ðeɖefia, ɣaɣla, kple bubuwo:
- Ena ɖeɖefia ƒe dɔwɔnuwo wɔa dɔ (le kpɔɖeŋu me,
.d-none
kpled-{sm,md,lg,xl}-none
). .hidden-*
Woɖe asi le dɔwɔnu siwo wozãna tsɔ ɖea nu yeyewo fiana ƒe dɔwɔnuwo ƒe akpa gãtɔ ŋu . Le kpɔɖeŋu me.hidden-sm-up
, zã.d-sm-none
. Wotrɔ ŋkɔ na dɔwɔnuawo.hidden-print
be woazã ɖeɖefia dɔwɔnu ƒe ŋkɔyɔyɔ ƒe ɖoɖoa. Nyatakaka bubuwo le Responsive utilities ƒe akpa si le axa sia te.- Wotsɔ
.float-{sm,md,lg,xl}-{left,right,none}
klasswo kpe ɖe eŋu na responsive floats eye woɖee ɖa.pull-left
eye.pull-right
esi wònye be wole redundant na.float-left
kple.float-right
.
- Ena ɖeɖefia ƒe dɔwɔnuwo wɔa dɔ (le kpɔɖeŋu me,
- Ƒomevi:
- Wotsɔ tɔtrɔ siwo ɖoa nya ŋu kpe ɖe míaƒe nuŋɔŋlɔ ƒe ɖoɖowɔwɔ ƒe klasswo
.text-{sm,md,lg,xl}-{left,center,right}
ŋu .
- Wotsɔ tɔtrɔ siwo ɖoa nya ŋu kpe ɖe míaƒe nuŋɔŋlɔ ƒe ɖoɖowɔwɔ ƒe klasswo
- Ðoɖowɔwɔ ɖe ɖoɖo nu kple dometsotso:
- Wotsɔ margin yeye siwo ɖoa nya ŋu kple padding utilities kpe ɖe eŋu na akpawo katã, hekpe ɖe vertical kple horizontal shorthands ŋu.
- Wotsɔ tɔdziʋu gbogbo aɖewo kpe ɖe flexbox utilities ŋu .
- Woɖe asi le eŋu na klass
.center-block
yeyea ..mx-auto
- Wotrɔ asi le Clearfix ŋu be wòaɖe asi le kpekpeɖeŋunana web-browser ƒe tɔtrɔ xoxowo ŋu.
Bootstrap 3 ƒe vendor prefix mixins, siwo woɖe ɖa le v3.2.0 me la, woɖe wo ɖa le Bootstrap 4. Esi míezãa Autoprefixer ta la, womegahiã o.
Woɖe mixin siwo gbɔna ɖa: 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
Míaƒe nuŋlɔɖiwo xɔ ŋgɔyiyi le board katã hã me. Esiae nye nusi bɔbɔ ɖe anyi:
- Míegale Jekyll zãm kokoko, gake plugins le mía si le mix la me:
bugify.rb
wozãna tsɔ ŋlɔa nya siwo le míaƒe browser ƒe vodadawo ƒe axaa dzi la nyuie.example.rb
nye custom fork na defaulthighlight.rb
plugin, si ɖe mɔ na kpɔɖeŋu-code zazã bɔbɔe wu.callout.rb
nye fɔkpa si wowɔ ɖe ɖoɖo nu ma tɔgbe le ema me, gake wowɔe na míaƒe docs yɔyɔ tɔxɛwo.- jekyll-toc ye wozãna tsɔ wɔa míaƒe emenyawo ƒe kplɔ̃.
- Wogbugbɔ ŋlɔ docs me nyawo katã ɖe Markdown me (ɖe HTML teƒe) be woatrɔ asi le wo ŋu bɔbɔe.
- Wogbugbɔ ɖo axawo ɖe ɖoɖo nu be nya siwo le bɔbɔe wu kple ɖoɖo si nu woate ŋu ate ɖe wo nɔewo ŋu la nanɔ wo ŋu.
- Míeʋu tso CSS si wozãna edziedzi me yi SCSS dzi be míawɔ Bootstrap ƒe tɔtrɔwo, mixins, kple bubuwo ŋudɔ bliboe.
Woɖe @screen-
tɔtrɔwo katã ɖa le v4.0.0 me. Zã media-breakpoint-up()
, media-breakpoint-down()
, alo media-breakpoint-only()
Sass mixins alo $grid-breakpoints
Sass ƒe anyigbatata ɖe eteƒe.
Woɖe míaƒe utility class siwo ɖoa nya ŋu la ɖa le akpa gãtɔ me tsɔ do alɔ utility siwo wogblɔ tẽ display
.
- Woɖe
.hidden
kple.show
klassawo ɖa elabena wotsi tre ɖe jQuery ƒe$(...).hide()
kple$(...).show()
mɔnuwo ŋu. Ke boŋ dze agbagba nàtrɔ[hidden]
nɔnɔmea alo nàzã atsyã siwo le fli me abestyle="display: none;"
kplestyle="display: block;"
. - Woɖe
.hidden-
klasswo katã ɖa, negbe agbalẽtata ƒe dɔwɔnu siwo wogbugbɔ ŋkɔ na la koe.- Woɖee ɖa le v3 me:
.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
- Woɖee ɖa le v4 alphas me:
.hidden-xs-up
.hidden-xs-down
.hidden-sm-up
.hidden-sm-down
.hidden-md-up
.hidden-md-down
.hidden-lg-up
.hidden-lg-down
- Woɖee ɖa le v3 me:
- Agbalẽtata ƒe dɔwɔnuwo megadzea egɔme kple
.hidden-
alo o.visible-
, ke boŋ kple.d-print-
.- Ŋkɔ xoxowo:
.visible-print-block
,.visible-print-inline
,.visible-print-inline-block
, ..hidden-print
- Klass yeyewo:
.d-print-block
,.d-print-inline
,.d-print-inline-block
, ..d-print-none
- Ŋkɔ xoxowo:
Le esi teƒe be nàzã .visible-*
klass siwo me kɔ la, èna element aɖe dzena to ɖeko màɣlae ɖe screen ƒe lolome ma nu o me. Àteŋu aƒo .d-*-none
klass ɖeka kple klass ɖeka nu ƒu .d-*-block
atsɔ aɖe element aɖe afia le screen ƒe lolomewo ƒe dometsotso aɖe si wona ko dzi (le kpɔɖeŋu me, .d-none.d-md-block.d-xl-none
eɖea element la fia le mɔ̃ siwo le titina kple gãwo dzi ko).
De dzesii be tɔtrɔ siwo wowɔ le grid breakpoints me le v4 me fia be ahiã be nàyi breakpoint ɖeka si lolo wu be nàkpɔ emetsonu mawo ke. Dɔwɔnu ƒe hatsotso yeye siwo ɖoa nya ŋu la medzea agbagba be yewoaxɔ nɔnɔme siwo mebɔ o siwo me womate ŋu aɖe nu vevi aɖe ƒe nukpɔkpɔ afia abe nukpɔkpɔ ƒe lolome ƒe didime ɖeka si tsiã ɖe enu ene o; ahiã be nàzã CSS si wowɔ ɖe ɖoɖo nu boŋ le nɔnɔme mawo me.