in English

Ku rhurhela eka v4

Bootstrap 4 i ku tsariwa nakambe lokukulu ka phurojeke hinkwayo. Ku cinca loku xiyekaka swinene ku katsakanyiwile laha hansi, ku landzela ku cinca loku kongomeke swinene eka swiphemu leswi faneleke.

Ku cinca loku tiyeke

Ku suka eka Beta 3 ku ya eka nkandziyiso wa hina lowu tiyeke wa v4.x, a ku na ku cinca loku tshovekaka, kambe ku na ku cinca kun’wana loku xiyekaka.

Ku kandziyisa

  • Ku lulamisiwile switirhisiwa swo gandlisa leswi onhakeke. Khale, ku tirhisa .d-print-*tlilasi a swi ta tlula tlilasi yin’wana swi nga languteriwanga .d-*. Sweswi, ti fambisana na switirhisiwa swa hina swin’wana swa nkombiso naswona ti tirha ntsena eka swihangalasamahungu sweswo ( @media print).

  • Ku andlariwile switirhisiwa swa nkombiso wo gandlisa leswi kumekaka ku fambisana na switirhisiwa swin’wana. Beta 3 na ku tlula ntsena a va ri na block, inline-block, inline, na none. Stable v4 yi engeteriwile flex, inline-flex, table, table-row, na table-cell.

  • Ku hundzuluxiwa ka xikombiso xa le mahlweni xa ku gandlisa loku lulamisiweke eka swihlamusela-marito hinkwaswo leswi nga ni switayele leswintshwa swo gandlisa leswi hlamuselaka @page size.

Beta 3 yi cinca

Loko Beta 2 yi vonile vunyingi bya ku cinca ka hina loku tshovekaka hi nkarhi wa xiyenge xa ​​beta, kambe ha ha ri na swi nga ri swingani leswi a swi lava ku lulamisiwa eka nkandziyiso wa Beta 3. Ku cinca loku ku tirha loko u pfuxeta eka Beta 3 ku suka eka Beta 2 kumbe vuhundzuluxeri byihi na byihi bya khale bya Bootstrap.

Swo hambana

  • Ku susiwile $thumbnail-transitionxihlawulekisi lexi nga tirhisiwangiki. A hi nga ri eku hundzuleni ka nchumu, kutani a ku ri khodi yo engetela ntsena.
  • Phasela ra npm a ra ha katsi tifayela tin’wana handle ka tifayela ta hina ta xihlovo na ta dist; loko u titshege hi vona naswona u ri karhi u tirhisa switshuriwa swa hina hi ku tirhisa node_modulesfolda, u fanele u cinca ndlela leyi u tirhaka ha yona.

Swivumbeko

  • Tsala nakambe mabokisi yo kambela ya ntolovelo na ya ntolovelo na swiya-ni-moya. Sweswi, havumbirhi bya tona ti na xivumbeko xa HTML lexi fambelanaka (ehandle <div>na makwavo <input>na <label>) na switayele swa layout leswi fanaka (stacked default, inline na modifier class). Leswi swi hi pfumelela ku xitayili xa lebula hi ku ya hi xiyimo xa ngheniso, ku olovisa nseketelo wa disabledxihlawulekisi (khale a wu lava tlilasi ya mutswari) na ku seketela ku antswa ku tiyisisiwa ka fomo ya hina.

    Tanihi xiphemu xa leswi, hi cincile CSS yo lawula background-images yo tala eka mabokisi yo kambela ya fomo ya ntolovelo na swiya-ni-moya. Khale, .custom-control-indicatorelemente leyi sweswi yi susiweke a yi ri na muvala wa le ndzhaku, gradient, na xifaniso xa SVG. Ku endla leswaku xivumbeko xa le ndzhaku xi va lexi u xi lavaka a swi vula ku cinca hinkwaswo sweswo nkarhi wun’wana ni wun’wana loko u lava ku cinca yin’we ntsena. Sweswi, hi na .custom-control-label::beforefor ku tata na gradient na .custom-control-label::afterhandles icon.

    Ku endla ku kamberiwa ka ntolovelo endzeni ka layini, engetela .custom-control-inline.

  • Xihlawulekisi lexi pfuxetiweke xa mintlawa ya swikomba-nkarhi leyi sekeriweke eka ku nghenisa. Ematshan’weni ya [data-toggle="buttons"] { }xitayili na mahanyelo, hi tirhisa dataxihlawulekisi ntsena eka mahanyelo ya JS naswona hi titshege hi .btn-group-toggletlilasi leyintshwa ya xitayili.

  • Ku susiwile .col-form-legendku seketela ku antswisiwa katsongo .col-form-label. Hi ndlela leyi .col-form-label-smnaswona .col-form-label-lgyi nga tirhisiwa eka <legend>swiaki hi ku olova.

  • Swingheniso swa fayili ya ntolovelo swi amukele ku cinca eka $custom-file-textxihlawulekisi xa swona xa Sass. A ya ha ri mepe wa Sass lowu pfanganisiweke naswona sweswi wu nyika matimba eka ntambhu yin’we ntsena— Browsebuti tanihi leswi sweswi ku nga yona ntsena pseudo-element leyi endliweke ku suka eka Sass ya hina. Tsalwa Choose filesweswi ri huma eka .custom-file-label.

Mintlawa yo nghenisa

  • Ti addon ta ntlawa wa input sweswi ti kongomile eka ku vekiwa ka tona loko ti pimanisiwa na input. Hi wile .input-group-addonnaswona .input-group-btneka titlilasi timbirhi letintshwa, .input-group-prependnaswona .input-group-append. U fanele ku tirhisa hi ku kongoma append kumbe prepend sweswi, ku olovisa xiphemu lexikulu xa CSS ya hina. Endzeni ka append kumbe prepend, veka swikomba-nkarhi swa wena tanihi leswi swi nga ta va kona kun’wana ni kun’wana, kambe phutsela tsalwa eka .input-group-text.

  • Switayili swa ku tiyisisa sweswi swa seketeriwa, tanihi swingheniso swo tala (hambi leswi u nga tiyisisaka ntsena ku nghenisa kun’we hi ntlawa).

  • Titlilasi to pima ti fanele ku va eka mutswari .input-groupku nga ri eka swiaki swa xivumbeko ha xin’we.

Beta 2 yi cinca

Loko hi ri eka beta, hi kongomisa ku va na ku cinca loku tshovekaka. Hambiswiritano, a hi minkarhi hinkwayo swilo swi fambaka hilaha a swi kunguhatiwe hakona. Laha hansi ku na ku cinca loku tshovekaka loku u faneleke ku ku tsundzuka loko u suka eka Beta 1 ku ya eka Beta 2.

Ku tshoveka

  • Ku susiwile $badge-colorxihlawulekisi na matirhiselo ya xona eka .badge. Hi tirhisa ntirho wa ku hambana ka mihlovo ku hlawula a colorhi ku ya hi background-color, hikwalaho xihlawulekisi a xi laveki.
  • Ku thyiwile vito lerintshwa ra grayscale()ntirho ku papalata ku herisa ku lwisana na xisefo xa gray()ntumbuluko xa CSS .grayscale
  • Ku thyiwile vito lerintshwa ra .table-inverse, .thead-inverse, na .thead-defaultku ya eka .*-darkna .*-light, ku fambisana ni swikimi swa hina swa mihlovo leswi tirhisiwaka kun’wana.
  • Matafula lama hlamulaka sweswi ya humesa titlilasi eka ndhawu yin’wana na yin’wana yo tshoveka ya giridi. Leswi swi tshoveka eka Beta 1 hi leswaku the leyi .table-responsiveu nga tshama u yi tirhisa yi fana ngopfu na .table-responsive-md. Sweswi u nga ha tirhisa .table-responsivekumbe .table-responsive-{sm,md,lg,xl}hilaha swi lavekaka hakona.
  • Ku hoxiwa nseketelo wa Bower tanihileswi mufambisi wa phasela a nga ha tirhisiwi eka swin’wana (xikombiso, Yarn kumbe npm). Vona bower/bower#2298 ku kuma vuxokoxoko.
  • Bootstrap ya ha lava jQuery 1.9.1 kumbe ku tlula, kambe u tsundzuxiwa ku tirhisa vuhundzuluxeri bya 3.x tanihi leswi swihlamusela-marito leswi seketeriwaka swa v3.x ku nga swona leswi Bootstrap yi swi seketelaka ku engetela eka v3.x yi nga ni swintshuxo swo karhi swa vuhlayiseki.
  • Ku susiwile .form-control-labeltlilasi leyi nga tirhisiwangiki. Loko u endlile ku tirhisa tlilasi leyi, a ku ri duplicate ya .col-form-labeltlilasi leyi vertically centered a <label>na yona leyi fambelanaka na input eka horizontal form layouts.
  • Ku cinciwile ku color-yiqsuka eka mixin leyi katsaka colornhundzu ku ya eka ntirho lowu vuyisaka ntikelo, ku ku pfumelela ku wu tirhisa eka nhundzu yihi na yihi ya CSS. Hi xikombiso, ematshan’weni ya color-yiq(#000), u ta tsala color: color-yiq(#000);.

Tinhla-nkulu

  • pointer-eventsKu nghenisiwile matirhiselo lamantshwa eka ti-modal. Le handle .modal-dialogyi hundza eka swiendlakalo na pointer-events: nonefor custom click handling (leswi endlaka leswaku swi koteka ku yingisela ntsena eka .modal-backdropfor any clicks), ivi yi counteracts it for the actual .modal-contentwith pointer-events: auto.

Nkomiso

Hi leswi swilo leswikulu swa mathikithi leswi u nga ta lava ku swi lemuka loko u suka eka v3 u ya eka v4.

Nseketelo wa xihlamusela-marito

  • Ku lahlile nseketelo wa IE8, IE9, na iOS 6. v4 sweswi i IE10+ ntsena na iOS 7+. Eka tisayiti leti lavaka xin’wana xa swona, tirhisa v3.
  • Ku engeteriwile nseketelo wa ximfumo wa Android v5.0 Lollipop's Browser na WebView. Tivhidiyo ta khale ta Android Browser na WebView ti tshama ti seketeriwa ntsena hi ndlela leyi nga riki ya ximfumo.

Ku cinca ka misava hinkwayo

  • Flexbox yi tirhisiwile hi ku tiyimisela. Hi ku angarhela leswi swi vula ku suka eka swiphaphama na swo tala ku tsemakanya swiphemu swa hina.
  • Ku cinciwile ku suka eka Less ku ya eka Sass eka tifayela ta hina ta CSS ta xihlovo.
  • Ku cinciwile ku suka eka pxku ya remtanihi yuniti ya hina ya nkoka ya CSS, hambileswi tipikseli ta ha tirhisiwaka eka swivutiso swa midiya na mahanyelo ya giridi tanihileswi swivono swa switirhisiwa swi nga khumbekiki hi mpimo wa muxaka.
  • Vukulu bya tifonto bya misava hinkwayo byi andzile ku suka eka 14pxku ya eka 16px.
  • Ku pfuxetiwile ti-tiers ta gridi ku engetela nhlawulo wa vuntlhanu (ku adirese switirhisiwa leswitsongo eka 576pxna le hansi) na ku susa -xsinfix eka titlilasi teto. Xikombiso: .col-6.col-sm-4.col-md-3.
  • Ku siviwe theme ro hlawula leri hambaneke hi swihlawulekisi leswi hleriwaka hi ku tirhisa swilo leswi cinca-cincaka swa SCSS (xikombiso, $enable-gradients: true).
  • Build system yi lulamisiwile ku tirhisa nxaxamelo wa switshuriwa swa npm ematshan’wini ya Grunt. Vona package.jsoneka switshuriwa hinkwaswo, kumbe phurojeke ya hina readme eka swilaveko swa nhluvukiso wa ndhawu.
  • Ku tirhisiwa loku nga hlamuriki ka Bootstrap a ka ha seketeriwi.
  • U hoxe Customizer ya le ka inthanete hi ku tsakela matsalwa yo anama swinene ya ku lulamisa ni ku aka loku endleriweke ku tirhisiwa.
  • Ku engeteriwe makume ya titlilasi letintshwa ta vukorhokeri bya mimpatswa ya nkoka ya nhundzu ya CSS leyi tolovelekeke na swipfuxeto swa ku hambana ka margin/padding.

Endlelo ra gridi

  • Ku rhurhisiwile eka flexbox.
    • Ku engeteriwe nseketelo wa flexbox eka ti-mixin ta gridi na titlilasi leti hlamuseriweke ka ha ri emahlweni.
    • Tanihi xiphemu xa flexbox, ku katsa nseketelo wa titlilasi ta ku ringanisa loku yimisiweke ni loku nga etlhelo.
  • Mavito ya titlilasi ta gridi lama pfuxetiweke na xiyimo lexintshwa xa gridi.
    • Ku engeteriwile smgrid tier leyintshwa laha hansi 768pxku kuma vulawuri byo tala bya granular. Sweswi hi na xs, sm, md, lg, na xl. Leswi swi tlhela swi vula leswaku tier yin’wana na yin’wana yi bumped up one level (so .col-md-6eka v3 sweswi yi .col-lg-6le ka v4).
    • xstitlilasi ta gridi ti cinciwile leswaku ti nga lavi leswaku infix yi yimela kahle leswaku ti sungula ku tirhisa switayele eka min-width: 0naswona ku nga ri ntikelo wa pixel lowu vekiweke. Ematshan’weni ya .col-xs-6, sweswi i .col-6. Ti-tier tin’wana hinkwato ta gridi ti lava infix (xikombiso, sm).
  • Ku pfuxetiwa ka vukulu bya gridi, mixins, na swilo leswi cinca-cincaka.
    • Ti grid gutters sweswi tina mepe wa Sass leswaku uta kota ku boxa ti gutter widths tokarhi eka breakpoint yin’wana na yin’wana.
    • Ti mixins ta gridi leti pfuxetiweke ku tirhisa make-col-readymixin ya prep na a make-colku veka flexna max-widthku pima kholomo yin’wana na yin’wana.
    • Ku cinciwile ti breakpoints ta xivutiso xa midiya ya sisiteme ya gridi na ku anama ka xikhomela ku hlamusela xiyimo xa gridi lexintshwa na ku tiyisisa leswaku tikholomu ti avanyisiwa hi ku ringana hi 12eka ku anama ka tona ka max.
    • Tindhawu to tshoveka ta gridi na ku anama ka xikhomela sweswi swi khomiwa hi ku tirhisa mimepe ya Sass ( $grid-breakpointsna $container-max-widths) ematshan’wini ya voko ra swilo leswi cinca-cincaka leswi hambaneke. Leswi swi siva @screen-*swilo leswi cinca-cincaka hi ku helela naswona swi ku pfumelela ku lulamisa hi ku helela swiphemu swa giridi.
    • Swivutiso swa swihangalasamahungu na swona swi cincile. Ematshan’weni yo phindha switiviso swa hina swa swivutiso swa vuhangalasi bya mahungu hi ntikelo lowu fanaka nkarhi wun’wana ni wun’wana, sweswi hi ni @include media-breakpoint-up/down/only. Sweswi, ematshan’weni yo tsala @media (min-width: @screen-sm-min) { ... }, u nga tsala @include media-breakpoint-up(sm) { ... }.

Swiphemu swa kona

  • Tiphaneleni leti hoxiweke, swifaniso leswitsongo ni swihlovo swa xiphemu lexintshwa lexi katsaka hinkwaswo, ku nga makhadi .
  • U hoxe fonto ya xifaniso xa Glyphicons. Loko u lava swifaniso, swin’wana leswi u nga swi hlawulaka hi leswi:
  • Ku hoxiwe xiengetelo xa Affix jQuery.
    • Hi ringanyeta ku tirhisa position: stickyematshan’weni ya sweswo. Vona HTML5 Hi kombela u nghena ku kuma vuxokoxoko na switsundzuxo swo karhi swa polyfill. Xiringanyeto xin’wana i ku tirhisa @supportsnawu wo wu tirhisa (xikombiso, @supports (position: sticky) { ... }) .
    • Loko a wu tirhisa Affix ku tirhisa swin’wana, leswi nga riki positionswitayele, ti-polyfill ti nga ha va ti nga seketeli xiyimo xa wena xa matirhiselo. Ndlela yin’wana ya matirhiselo yo tano i layiburari ya ScrollPos-Styler ya munhu wa vunharhu .
  • U wise xiphemu xa pager tanihi leswi kahle-kahle a ku ri swikomba-nkarhi leswi endleriweke ku tirhisiwa ka swona.
  • Ku endliwe hi vuntshwa kwalomu ka swiphemu hinkwaswo ku tirhisa swihlawulekisi swo tala swa tlilasi leswi nga riki na swisaka ematshan’weni ya swihlawulekisi swa vana leswi kongomeke ngopfu.

Hi xiphemu

Nxaxamelo lowu wu kombisa ku cinca ka nkoka hi xiphemu exikarhi ka v3.xx na v4.0.0.

Reboot nakambe

Lexintshwa eka Bootstrap 4 i Reboot , xitayili lexintshwa lexi akaka eka Normalize hi switayele swa hina swa ku tlherisela leswi nga ni mavonelo yo karhi. Swihlawulekisi leswi humelelaka eka fayili leyi swi tirhisa ntsena swiaki—a ku na titlilasi laha. Leswi swi hambanyisa switayele swa hina swa reset eka switayele swa hina swa swiphemu ku kuma endlelo ra modular swinene. Swin’wana swa swintshuxo swa nkoka swinene leswi leswi swi swi katsaka i ku box-sizing: border-boxcinca, ku suka emeka remtiyuniti eka swiaki swo tala, switayele swa vuhlanganisi, na ku vuyiseriwa ko tala ka swiaki swa xivumbeko.

Ku thayipa

  • Ku rhurhiseriwe .text-switirhisiwa hinkwaswo eka _utilities.scssfayili.
  • Droped .page-headertani hi leswi switayele swa yona swinga tirhisiwaka hiku tirhisa ti utilities.
  • .dl-horizontalyi hoxiwile ehansi. Ematshan’wini ya sweswo, tirhisa .rowon <dl>na ku tirhisa titlilasi ta kholomo ya gridi (kumbe mixins) eka yona <dt>na <dd>vana.
  • Ti blockquotes leti endliweke hi vuntshwa, ti susa switayele swa tona ku suka eka <blockquote>elemente ku ya eka tlilasi yin’we, .blockquote. Ku lahlile .blockquote-reversexihundzuluxi xa switirhisiwa swa matsalwa.
  • .list-inlinesweswi yi lava leswaku vana va yona va xaxameta swilo va endla leswaku .list-inline-itemtlilasi leyintshwa yi tirhisiwa eka vona.

Swifaniso

  • Ku thyiwile vito lerintshwa .img-responsiveri va .img-fluid.
  • Ku thyiwile vito lerintshwa .img-roundedra.rounded
  • Ku thyiwile vito lerintshwa .img-circlera.rounded-circle

Matafula

  • Kwalomu ka swikombiso hinkwaswo swa >xihlawulekisi swi susiwile, leswi vulaka leswaku matafula lama pfanganisiweke sweswi ma ta dya ndzhaka ya switayele hi ku tisungulela eka vatswari va wona. Leswi swi olovisa swinene swihlawulekisi swa hina na ku cinca loku nga vaka kona.
  • Ku thyiwile vito lerintshwa ra .table-condensedku va .table-smku nga cinci.
  • Ku engeteriwe ndlela leyintshwa .table-inverseyo hlawula.
  • Ku engeteriwe swicinci swa nhlokomhaka ya tafula: .thead-defaultna .thead-inverse.
  • Ku thyiwile mavito lamantshwa ya titlilasi ta xiyimo ku va na .table--prefix. Hikwalaho .active, .success, .warning, .dangerna .infoku .table-active, .table-success, .table-warning, .table-dangerna .table-info.

Swivumbeko

  • Xiaki lexi rhurhisiweke xi tlherisela eka _reboot.scssfayili.
  • Ku thyiwile vito lerintshwa .control-labelri va .col-form-label.
  • Ku thyiwile vito lerintshwa .input-lgna .input-smku ya eka .form-control-lgna .form-control-sm, hi ku landzelelana.
  • U tshike .form-group-*titlilasi hikwalaho ko olova. Tirhisa .form-control-*titlilasi ematshan’weni ya sweswo sweswi.
  • Yi hoxe ehansi .help-blockyi yi siva hi .form-texttsalwa ra mpfuneto wa xiyimo xa xibokisana. Ku kuma tsalwa ra mpfuneto wa le ndzeni ka layini na swihlawulekisi swin’wana leswi cinca-cincaka, tirhisa titlilasi ta vukorhokeri to fana na .text-muted.
  • Ku wisa .radio-inlinenaswona .checkbox-inline.
  • Ku hlanganisiwa .checkboxna .radioku nghena na titlilasi .form-checkto hambana ..form-check-*
  • Swivumbeko swa horizontal leswi lulamisiweke:
    • U tshike .form-horizontalxilaveko xa tlilasi.
    • .form-groupa ya ha tirhisi switayele ku suka eka .rowvia mixin, hikwalaho .rowsweswi swa laveka eka swivumbeko swa gridi ya horizontal (xikombiso, <div class="form-group row">).
    • Ku engeteriwe .col-form-labeltlilasi leyintshwa eka malebvu ya le xikarhi ka vertically hi .form-controls.
    • Ku engeteriwe leswintshwa .form-rowswa swivumbeko swa xivumbeko xo koma na titlilasi ta gridi (swap your .rowfor a .form-rowand go).
  • Ku engeteriwe nseketelo wa tifomo ta ntolovelo (eka mabokisi yo kambela, swiya-ni-moya, swihlawulekisi, na ku nghenisa tifayela).
  • Ku siviwe .has-error, .has-warning, na .has-successtitlilasi hi ku tiyisisiwa ka xivumbeko xa HTML5 hi ku tirhisa ti-CSS :invalidna :validtitlilasi ta vuxisi.
  • Ku thyiwile vito lerintshwa .form-control-staticri va .form-control-plaintext.

Swikomba-nkarhi

  • Ku thyiwile vito lerintshwa .btn-defaultri va .btn-secondary.
  • Drop the .btn-xsclass hi ku helela tani hi leswi .btn-smswi nga proportionally switsongo swinene ku tlula v3's.
  • Xivumbeko xa buti ya xiyimo xa button.jsxiengetelo xa jQuery xi hoxiwile. Leswi swi katsa $().button(string)na $().button('reset')tindlela ta. Hi tsundzuxa ku tirhisa xiphemu lexitsongo xa JavaScript ya ntolovelo ematshan’weni ya sweswo, leyi nga ta va ni vuyelo byo tikhoma hi ndlela leyi u yi lavaka ha yona.
    • Xiya leswaku swihlawulekisi swin’wana swa plugin (mabokisi yo kambela ya swikomba-nkarhi, swiya-ni-moya swa swikomba-nkarhi, swikomba-ndlela leswi cinca-cincaka kan’we) swi hlayisiwile eka v4.
  • Cinca swikomba-nkarhi' [disabled]ku ya eka :disabledtanihi leswi IE9+ yi seketelaka :disabled. Kambe fieldset[disabled]swa ha laveka hikuva ti-fieldset ta ntumbuluko leti nga tirhiki ta ha ri na swihoxo eka IE11 .

Ntlawa wa swikomba-nkarhi

  • Tsala xiphemu nakambe hi flexbox.
  • Ku susiwile .btn-group-justified. Tanihi xisirhelelo u nga tirhisa <div class="btn-group d-flex" role="group"></div>tanihi xifunengeto ku rhendzela swiaki leswi nga na .w-100.
  • U .btn-group-xstshike tlilasi hi ku helela a nyikiwe ku susiwa ka .btn-xs.
  • Ku susiwile ku hambana loku nga erivaleni exikarhi ka mintlawa ya swikomba-nkarhi eka tibarhi ta switirhisiwa swa swikomba-nkarhi; tirhisa switirhisiwa swa margin sweswi.
  • Maphepha lama antswisiweke yo tirhisiwa na swiphemu swin’wana.
  • Ku cinciwile ku suka eka swihlawulekisi swa vatswari ku ya eka titlilasi ta vun’we eka swiphemu hinkwaswo, swicinci, na swin’wana.
  • Switayele leswi olovisiweke swa ku rhelela leswaku swi nga ha rhumeriwi hi miseve leyi languteke ehenhla kumbe ehansi leyi khomanisiweke ni menyu leyi nga ehansi.
  • Ti dropdowns tinga akiwa hi <div>s kumbe <ul>s sweswi.
  • Switayele swa ku rhelela leswi akiweke nakambe na ku fungha ku nyika nseketelo wo olova, lowu akiweke endzeni eka <a>na <button>swilo leswi rhetaka leswi simekiweke.
  • Ku thyiwile vito lerintshwa .dividerri va .dropdown-divider.
  • Swilo leswi nga ehansi sweswi swi lava .dropdown-item.
  • Ti toggles ta dropdown a ta ha lavi explicit <span class="caret"></span>; leswi sweswi swi nyikiwa hi ku tisungulela hi ku tirhisa ti-CSS ::aftereka .dropdown-toggle.

Endlelo ra gridi

  • Ku engeteriwile ndhawu leyintshwa 576pxyo tshoveka ya giridi tanihi sm, leswi vulaka leswaku sweswi ku na ntlhanu wa swiyenge hinkwaswo ( xs, sm, md, lg, na xl).
  • Ku thyiwile vito lerintshwa ra titlilasi ta mucinci wa giridi lowu hlamulaka ku suka eka .col-{breakpoint}-{modifier}-{size}ku .{modifier}-{breakpoint}-{size}ya eka titlilasi ta giridi to olova.
  • Ku lahliwile titlilasi ta push na pull modifier ta titlilasi letintshwa leti tirhisaka flexbox order. Hi xikombiso, ematshan’weni ya .col-8.push-4na .col-4.pull-8, u ta tirhisa .col-8.order-2na .col-4.order-1.
  • Ku engeteriwe titlilasi ta vukorhokeri bya flexbox ta sisiteme ya giridi na swiphemu.

Xaxameta mintlawa

  • Tsala xiphemu nakambe hi flexbox.
  • Ku siviwa a.list-group-itemhi tlilasi leyi nga erivaleni, .list-group-item-action, ya switayili swa xihlanganisi na tivhidiyo ta buti ta swilo swa ntlawa wa nxaxamelo.
  • Ku engeteriwe .list-group-flushtlilasi leyi tirhisiwaka ni makhadi.
  • Tsala xiphemu nakambe hi flexbox.
  • Loko hi nyikiwa ku rhurha eka flexbox, ku ringanisiwa ka swifaniso swo hlongola eka nhlokomhaka swi nga ha va swi onhakile tanihi leswi hi nga ha tirhisiki swiphaphama. Floated content yi ta ku sungula, kambe hi flexbox sweswo a swa ha ri tano. Pfuxeta swifaniso swa wena swa ku hlongoriwa ku ta endzhaku ka swihloko swa modal ku swi lulamisa.
  • Nhlawulo remote(lowu nga tirhisiwaka ku layicha hi ku tisungulela no nghenisa swilo swa le handle eka modal) na loaded.bs.modalxiendlakalo lexi fambelanaka na swona swi susiwile. Hi ringanyeta ematshan’wini ya sweswo ku tirhisa xifaniso xa le tlhelo ra xilayenti kumbe rimba ro boha data, kumbe ku vitana jQuery.load hi wexe.
  • Tsala xiphemu nakambe hi flexbox.
  • Ku lahlile kwalomu ka >swihlawulekisi hinkwaswo swa xitayili xo olova hi ku tirhisa titlilasi leti nga riki na swisaka.
  • Ematshan’weni ya swihlawulekisi leswi kongomeke swa HTML swo fana na .nav > li > a, hi tirhisa titlilasi leti hambaneke ta .navs, .nav-items, na .nav-links. Leswi swi endla leswaku HTML ya wena yi olova swinene loko yi ri karhi yi tisa ku andlariwa loku engetelekeke.

Navbar yi tsariwile hi vuntshwa hi ku helela eka flexbox hi nseketelo lowu antswisiweke wa ku ringanisa, ku hlamula, na ku cinca-cinca.

  • Mahanyelo ya navbar lama hlamulaka sweswi ya tirhisiwa eka .navbartlilasi hi ku tirhisa leswi lavekaka .navbar-expand-{breakpoint} laha u hlawulaka laha u nga ta wisa kona navbar. Khale leswi a ku ri ku cinca loku cinca-cincaka ka le hansi naswona a ku lava ku hlengeletiwa nakambe.
  • .navbar-defaultis now .navbar-light, hambileswi .navbar-darkyi tshamaka yi ri tano. Yin’we ya leti ya laveka eka navbar yin’wana ni yin’wana. Hambiswiritano, titlilasi leti a ta ha veki background-colors; ematshan’weni ya sweswo kahle-kahle swi khumba ntsena color.
  • Navbars sweswi yi lava xitiviso xa le ndzhaku xa muxaka wo karhi. Hlawula eka switirhisiwa swa hina swa le ndzhaku ( .bg-*) kutani u veka swa wena hi titlilasi ta ku vonakala/ku hundzuka leti nga laha henhla ta ku tihlawulela ka mad .
  • Ku nyikiwa switayele swa flexbox, ti-navbar sweswi ti nga tirhisa switirhisiwa swa flexbox eka swihlawulekisi swo olova swa ku ringanisa.
  • .navbar-togglei sweswi .navbar-togglernaswona yi na switayele swo hambana na inner markup (no more three <span>s).
  • U tshike .navbar-formtlilasi hi ku helela. A swa ha bohi; ematshan’weni ya sweswo, tirhisa ntsena .form-inlineni ku tirhisa switirhisiwa swa margin tanihilaha swi lavekaka hakona.
  • Ti-navbar a ta ha katsi margin-bottomkumbe border-radiushi ku tiyimisela. Tirhisa switirhisiwa loko swi laveka.
  • Swikombiso hinkwaswo leswi kombisaka ti- navbar swi pfuxetiwile ku katsa na markup leyintshwa.

Ku vekiwa ka matluka

  • Tsala xiphemu nakambe hi flexbox.
  • Titlilasi leti nga erivaleni ( .page-item, .page-link) sweswi ta laveka eka vatukulu va .paginations
  • U wise .pagerxiphemu hi ku helela tanihi leswi a xi tlula switsongo ku tlula swikomba-ndlela leswi endleriweke ku endliwa hi ku landza swilaveko swa wena.
  • Tlilasi leyi nga erivaleni, .breadcrumb-item, sweswi ya laveka eka vatukulu va .breadcrumbs

Tilebhele na tibeji

  • Ku hlanganisiwa .labelna .badgeku hambanyisa ku suka eka <label>elemente na ku olovisa swiphemu leswi fambelanaka.
  • Ku engeteriwe .badge-pilltanihi mucinci wa ku languteka ka “philisi” loku rhendzelekaka.
  • Tibeji a ta ha papamalali hi ku tisungulela eka mintlawa ya nxaxamelo ni swiphemu swin’wana. Titlilasi ta vukorhokeri sweswi ta laveka eka sweswo.
  • .badge-defaultyi susiwile no .badge-secondaryengeteriwa ku fambisana na titlilasi ta vacincisi va swiphemu leti tirhisiwaka kun’wana.

Tiphaneleni, swifaniso leswitsongo ni swihlovo

Ku hoxiwe hi ku helela hikwalaho ka xiphemu lexintshwa xa khadi.

Tiphaneli

  • .panelku .card, sweswi yi akiwile hi flexbox.
  • .panel-defaultku susiwile naswona ku hava ku siviwa.
  • .panel-groupku susiwile naswona ku hava ku siviwa. .card-groupa hi ku siva, swi hambanile.
  • .panel-headingeka.card-header
  • .panel-titleku ya eka .card-title. Ku ya hi ku languteka loku lavekaka, u nga ha tlhela u lava ku tirhisa swiaki swa nhlokomhaka kumbe titlilasi (xikombiso <h3>, .h3) kumbe swiaki kumbe titlilasi to dzwihala (xikombiso <strong>, <b>, .font-weight-bold). Xiya leswaku .card-title, hambileswi yi thyiweke vito leri fanaka, yi humesa ku languteka loku hambaneke ni ka .panel-title.
  • .panel-bodyeka.card-body
  • .panel-footereka.card-footer
  • .panel-primary, .panel-success, .panel-info, .panel-warning, naswona .panel-dangerti hoxiwile eka .bg-, .text-, na .borderswitirhisiwa leswi endliweke ku suka eka $theme-colorsmepe wa hina wa Sass.

Ndzima

  • Ku siviwe .progress-bar-*titlilasi ta xiyimo hi .bg-*switirhisiwa. Hi xikombiso, class="progress-bar progress-bar-danger"swi va class="progress-bar bg-danger".
  • Ku siviwe .activehi tibara ta nhluvuko leti nga ni swifaniso leswi hanyaka hi .progress-bar-animated.
  • Ku lunghise xiphemu hinkwaxo leswaku ku olovisa dizayini ni xitayili. Hi na switayele swi nga ri swingani leswi u nga swi tlulaka, swikombiso leswintshwa, na swifaniso leswintshwa.
  • CSS hinkwayo yi susiwile naswona yi thyiwile vito lerintshwa, ku tiyisisa leswaku tlilasi yin’wana na yin’wana yi rhangeleriwa hi .carousel-.
    • Eka swilo swa carousel, .next, .prev, .left, naswona .rightsweswi i .carousel-item-next, .carousel-item-prev, .carousel-item-left, na .carousel-item-right.
    • .itemna yona sweswi .carousel-item.
    • Eka vulawuri bya prev/next, .carousel-control.rightnaswona .carousel-control.lefti sweswi .carousel-control-nextna .carousel-control-prev, leswi vulaka leswaku a swa ha lavi tlilasi ya xisekelo yo karhi.
  • Ku susiwile switayele hinkwaswo leswi hlamulaka, ku tlherisela endzhaku eka switirhisiwa (xikombiso, ku kombisa swifaniso eka swivono swo karhi) na switayele swa ntolovelo tanihilaha swi lavekaka hakona.
  • Ku susiwile ku tlula swifaniso swa swifaniso eka swilo swa carousel, ku tlherisela endzhaku eka switirhisiwa.
  • Tweaked xikombiso xa Carousel ku katsa markup leyintshwa na switayele.

Matafula

  • Ku susiwile nseketelo wa matafula lama nga ni switayele leswi pfanganisiweke. Switayili hinkwaswo swa tafula sweswi swi dya ndzhaka eka v4 eka swihlawulekisi swo olova.
  • Ku engeteriwe inverse tafula ra muxaka.

Switirhisiwa

  • Ku kombisa, ku tumbetiwa ni swin’wana:
    • Ku endliwe switirhisiwa swa nkombiso swi hlamula (xikombiso, .d-nonena d-{sm,md,lg,xl}-none).
    • Ku hoxiwe xiphemu lexikulu xa .hidden-*switirhisiwa swa switirhisiwa leswintshwa swo kombisa . Hi xikombiso, ematshan’weni ya .hidden-sm-up, tirhisa .d-sm-none. Ku cinciwile mavito ya .hidden-printswitirhisiwa ku tirhisa xikimi xa ku thya mavito ya switirhisiwa swa nkombiso. More info ehansi ka xiyenge xa ​​Responsive utilities xa tluka leri.
    • Ku engeteriwile .float-{sm,md,lg,xl}-{left,right,none}titlilasi ta ti float leti hlamulaka na ku susiwile .pull-leftna .pull-righttani hi leswi ti nga redundant eka .float-leftna .float-right.
  • Muxaka:
    • Ku engeteriwile ku hambana loku hlamulaka eka titlilasi ta hina ta ku ringanisa matsalwa .text-{sm,md,lg,xl}-{left,center,right}.
  • Ku ringanisa na ku hambana: .
    • Ku engeteriwe switirhisiwa leswintshwa swa margin yo hlamula na ku padding eka matlhelo hinkwawo, ku engetela eka switlhokovetselo swo koma leswi yimisiweke na leswi nga etlhelo.
    • Ku engeteriwe boatload ya switirhisiwa swa flexbox .
    • U wisiwe eka tlilasi .center-blockleyintshwa ..mx-auto
  • Clearfix yi pfuxetiwile ku tshika nseketelo wa tivhidiyo ta khale ta swihlamusela-marito.

Mixins ya xirhangi xa muxavisi

Bootstrap 3's vendor prefix mixins, leswi a swi nga ha tirhisiwi eka v3.2.0, swi susiwile eka Bootstrap 4. Tanihi leswi hi tirhisaka Autoprefixer , a swa ha laveki.

Ku susiwile swihlanganisi leswi landzelaka: 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

Ku tsariwa ka matsalwa

Maphepha ya hina ya amukerile ku ndlandlamuxiwa eka bodo hinkwayo na wona. Hi leyi low down:

  • Hi ha tirhisa Jekyll, kambe hi na ti-plugin eka mix:
    • bugify.rbyi tirhisiwa ku xaxameta hi ndlela leyinene swilo leswi nghenisiweke eka tluka ra hina ra swihoxo swa browser .
    • example.rbi foroko ya ntolovelo ya highlight.rbplugin ya ntolovelo, leyi pfumelelaka ku olova ka ku khoma xikombiso-khodi.
    • callout.rbi foroko ya ntolovelo leyi fanaka ya sweswo, kambe yi endleriwe ti-docs callout ta hina to hlawuleka.
    • jekyll-toc yi tirhisiwa ku tumbuluxa tafula ra hina ra swilo leswi nga endzeni.
  • Swilo hinkwaswo swa docs swi tsariwile nakambe eka Markdown (ematshan’wini ya HTML) leswaku swi olova ku swi hlela.
  • Matluka ma hleleriwe hi vuntshwa leswaku ma va ni swilo swo olova ni ku va ni xiyimo lexi tshinelelekaka.
  • Hi sukile eka CSS ya ntolovelo hi ya eka SCSS ku tirhisa hi ku hetiseka swilo leswi cinca-cincaka swa Bootstrap, mixins, na swin’wana.

Switirhisiwa leswi hlamulaka

Swilo hinkwaswo @screen-leswi cinca-cincaka swi susiwile eka v4.0.0. Tirhisa media-breakpoint-up(), media-breakpoint-down(), kumbe media-breakpoint-only()Sass mixins kumbe $grid-breakpointsmepe wa Sass ematshan’wini ya sweswo.

Titlilasi ta hina ta vukorhokeri leti hlamulaka ti susiwile ngopfu ku seketela displayswitirhisiwa leswi nga erivaleni.

  • Titlilasi ta .hiddenna .showti susiwile hikuva ti lwisana na jQuery's $(...).hide()na $(...).show()tindlela. Ematshan’weni ya sweswo, ringeta ku cinca-cinca [hidden]xihlawulekisi kutani u tirhisa switayele swa le ndzeni ka layini swo tanihi style="display: none;"na style="display: block;".
  • Titlilasi hinkwato .hidden-ti susiwile, handle ka switirhisiwa swo gandlisa leswi thyiweke mavito lamantshwa.
    • Ku susiwile eka v3:.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
    • Ku susiwile eka ti-alpha ta v4:.hidden-xs-up .hidden-xs-down .hidden-sm-up .hidden-sm-down .hidden-md-up .hidden-md-down .hidden-lg-up .hidden-lg-down
  • Switirhisiwa swo gandlisa a swa ha sunguli hi .hidden-kumbe .visible-, kambe hi .d-print-.
    • Mavito ya khale: .visible-print-block, .visible-print-inline, .visible-print-inline-block, ..hidden-print
    • Titlilasi letintshwa: .d-print-block, .d-print-inline, .d-print-inline-block, ..d-print-none

Ematshan’weni yo tirhisa .visible-*titlilasi leti nga erivaleni, u endla leswaku xiaki xi vonaka hi ku nga xi tumbeti ntsena hi mpimo wolowo wa xikirini. U nga hlanganisa .d-*-nonetlilasi yin’we na tlilasi yin’we .d-*-blockku kombisa elemente ntsena eka nkarhi lowu nyikiweke wa vukulu bya xikirini (xikombiso .d-none.d-md-block.d-xl-noneyi kombisa elemente ntsena eka switirhisiwa swa le xikarhi na leswikulu).

Xiya leswaku ku cinca eka swiphemu swa grid eka v4 swi vula leswaku u ta lava ku ya eka breakpoint yin’we leyikulu ku fikelela mbuyelo lowu fanaka. Titlilasi letintshwa ta vukorhokeri leti hlamulaka a ti ringeti ku amukela timhaka leti nga tolovelekangiki ngopfu laha ku vonakala ka elemente ku nga kombisiwiki tanihi nxaxamelo wun’we lowu hlanganeke wa vukulu bya xivono; ematshan’weni ya sweswo u ta lava ku tirhisa CSS ya ntolovelo eka swiyimo swo tano.