in English

Ʋ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.

Tɔtrɔ siwo li ke

Ne míeʋu tso Beta 3 yi míaƒe v4.x ƒ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.

Agbalẽtata

  • 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, kple none. Stable v4 kpe ɖe flex, inline-flex, table, table-row, kple table-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.

Beta 3 ƒe tɔtrɔwo

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.

Nu bubuwo

  • $thumbnail-transitionWoɖ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_modulesagbalẽdzraɖoƒea dzi la, ele be nàtrɔ asi le wò dɔwɔwɔ ŋu.

Kpekpeɖeŋugbalẽviwo

  • 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ɔe disabled(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-images geɖewo dzi kpɔkpɔ le agbalẽvi tɔxɛwo ƒe dzesiɖakawo kple radiowo dzi. Tsã la, .custom-control-indicatormegbe 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::beforena fill kple gradient eye .custom-control-label::afterwò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 klass datayeye aɖe ŋu hena atsyãwɔwɔ..btn-group-toggle

  • Woɖee ɖa .col-form-legendtsɔ do alɔ nusi wowɔ wònyo ɖe edzi vie .col-form-label. Mɔ sia dzi .col-form-label-smeye .col-form-label-lgwoate ŋ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-textSass tɔtrɔ ŋu. Meganye Sass ƒe anyigbatata si wotsɔ ƒo ƒui o eye fifia ka ɖeka koe wònaa ŋusẽ— Browsebɔt la elabena emae nye alakpa-nu ɖeka kolia si wowɔ tso míaƒe Sass me fifia. Fifia Choose filenuŋɔŋlɔa tso .custom-file-label.

Nusiwo wotsɔ de eme ƒe ƒuƒoƒowo

  • 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-addoneye .input-group-btnna klass yeye eve, .input-group-prependeye .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-groupdzi ke menye ɖekaɖeka ƒe nɔnɔme ƒe akpawo dzi o.

Beta 2 ƒe tɔtrɔwo

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.

Gbegblẽ

  • Woɖe $badge-colortɔtrɔɖenu kple eƒe zazã ɖa le .badge. Míezãa amadede ƒe vovototodedeameme ƒe dɔwɔwɔ tsɔ tiaa a si colorwotu ɖe background-color, eyata tɔtrɔa mehiã o.
  • Wotrɔ ŋkɔ na grayscale()dɔwɔwɔ be gray()be woaƒo asa na masɔmasɔ kple CSS native grayscalefilter la gbãgbã.
  • Wotrɔ ŋkɔ na .table-inverse, .thead-inverse, kple .thead-defaultna .*-darkkple .*-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-responsiveesi nèzãna la le abe .table-responsive-md. Àte ŋu azãe azɔ .table-responsivealo .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-labelWoɖe klass si wometsɔ wɔ dɔe o la ɖa. Ne èwɔ klass sia ŋudɔ la, enye klass la ƒe duplicate .col-form-labelsi vertically centered a <label>kple it's associated input in horizontal form layouts.
  • Trɔ la color-yiqtso mixin si me colornunɔ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ƒe color-yiq(#000)be nàŋlɔ color: color-yiq(#000);.

Nya Veviwo

  • Woto pointer-eventszazã yeye vɛ le modals dzi. Gotagome .modal-dialogla toa nudzɔdzɔwo me kple pointer-events: nonena custom click handling (si wɔnɛ be wòanya wɔ be nàɖo to ɖe ko dzi .modal-backdropna clicks ɖesiaɖe), eye emegbe wòtsia tre ɖe eŋu na ŋutɔŋutɔ .modal-contentkple pointer-events: auto.

Totoɖeme

Tiketi gã siwo nàdi be yeanya ne èle ʋuʋum tso v3 yi v4 dzi lae nye esi.

Browser ƒe kpekpeɖeŋu

  • 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.

Xexeame katã ƒe tɔtrɔwo

  • 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 pxyi remabe 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 14pxva ɖo 16px.
  • Wotrɔ asi le grid tiers ŋu be woatsɔ tiatia atɔ̃lia akpe ɖe eŋu (woaɖo adrɛs na mɔ̃ suewo le 576pxkple ete) eye woɖe -xsinfix ɖ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.

Grid ƒe ɖoɖo

  • 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.
    • smWotsɔ grid tier yeye kpe ɖe eŋu le ete 768pxhena granular dziɖuɖu geɖe wu. Fifia la xs, sm, , md, lg, kple xl. Esia hã fia be woƒo tier ɖesiaɖe ɖe dzi dzidzenu ɖeka (eyata .col-md-6le v3 me la, ele .col-lg-6v4 me fifia).
    • xswotrɔ 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 le min-width: 0eye 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-readyprep mixin kple a make-colatsɔ aɖo flexkple max-widthna 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 12le woƒe max width.
    • Wokpɔa grid breakpoints kple container widths gbɔ azɔ to Sass maps ( $grid-breakpointskple $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) { ... }.

Nusiwo le eme

  • 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:
  • Woɖe asi le Affix jQuery ƒe kpeɖeŋutɔa ŋu.
    • Míele aɖaŋu ɖom be nàzãe position: stickyboŋ. 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ã @supportsse aɖe atsɔ awɔ dɔe (le kpɔɖeŋu me, @supports (position: sticky) { ... }) .
    • Ne èle Affix zãm tsɔ nɔ bubu siwo menye positionatsyã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.
  • 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.

Le akpa aɖe nu

Ŋkɔ sia ɖe tɔtrɔ vevi siwo wowɔ le akpa aɖe nu le v3.xx kple v4.0.0 dome la fia.

Gbugbɔ dze egɔme

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-boxtɔtrɔ, ʋuʋu tso units emdzi remle element geɖewo dzi, kadodo ƒe atsyãwo, kple form element reset geɖewo.

Agbalẽtata ƒe nuŋɔŋlɔ

  • Woɖe dɔwɔnuawo katã .text-yi _utilities.scssfaɛl la me.
  • Woɖe .page-headerasi le eŋu abe alesi woate ŋu awɔ eƒe atsyãwo ŋudɔ to utilities dzi ene.
  • .dl-horizontalwoɖe asi le eŋu. Ke boŋ zã .rowon <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-reverseasi le nuŋɔŋlɔ ƒe dɔwɔnuwo ƒe tɔtrɔɖenu ŋu.
  • .list-inlinefifia bia tso viawo si be woaŋlɔ nuawo ɖi na .list-inline-itemklass yeyea nawɔ dɔ ɖe wo dzi.

Nɔnɔmetatawo

  • Wotrɔ ŋkɔ .img-responsivenɛ be .img-fluid.
  • Wotrɔ ŋkɔ .img-roundednɛ be.rounded
  • Wotrɔ ŋkɔ .img-circlenɛ be.rounded-circle

Kplɔ̃wo

  • 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-condensednɛ be .table-smwòawɔ ɖeka.
  • .table-inverseWotsɔ tiatia yeye aɖe kpee .
  • Wotsɔ kplɔ̃ ƒe tanya ƒe tɔtrɔwo kpe ɖe eŋu: .thead-defaultkple .thead-inverse.
  • Wotrɔ ŋkɔ na nya siwo ƒo xlãe ƒe klasswo be .table--ŋgɔgbe nanɔ wo ŋu. Eyata .active, .success, .warning, .dangerkple .infona .table-active, .table-success, .table-warning, .table-dangerkple .table-info.

Kpekpeɖeŋugbalẽviwo

  • Element si woɖe la gbugbɔ ɖoa _reboot.scss​​faɛl la me.
  • Wotrɔ ŋkɔ .control-labelnɛ be .col-form-label.
  • Wotrɔ ŋkɔ na .input-lgwo kple .input-smto .form-control-lgkple .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-textfor 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 .checkboxkple .radioɖe kple klass .form-checkvovovoawo ..form-check-*
  • Wogbugbɔ trɔ asi le nɔnɔme siwo le tsia dzi ŋu:
    • Woɖe asi le .form-horizontalklass ƒe nudidi la ŋu.
    • .form-groupmegawɔa atsyãwo ŋudɔ tso .rowvia mixin me o, eyata .rowfifia ehiã na horizontal grid ɖoɖowo (le kpɔɖeŋu me, <div class="form-group row">).
    • .col-form-labelWotsɔ klass yeye kpe ɖe vertically center labels ŋu kple .form-controls.
    • Wotsɔ yeye kpe ɖe eŋu .form-rowna compact form layouts kple grid classes (trɔ wò .rowɖe a .form-rowkple yi).
  • 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-successklasswo kple HTML5 nuŋlɔɖi ƒe kpeɖodzi to CSS's :invalidkple :validpseudo-klaswo dzi.
  • Wotrɔ ŋkɔ .form-control-staticnɛ be .form-control-plaintext.

Abɔtawo ƒe ƒuƒoƒo

  • Wotrɔ ŋkɔ .btn-defaultnɛ be .btn-secondary.
  • Woɖe asi le .btn-xsklass la ŋu keŋkeŋ abe alesi .btn-smwò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.jsEsia 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 :disabledabe alesi IE9+ doa alɔe :disabledene . Ke hã fieldset[disabled]egahiã kokoko elabena native disabled fieldsets gakpɔtɔ nye buggy le IE11 me.

Button ƒe ƒuƒoƒo

  • 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-xsklass 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ɔ .dividernɛ 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 ::afterdzi le .dropdown-toggle.

Grid ƒe ɖoɖo

  • 576pxWotsɔ grid breakpoint yeye kpee abe sm, si fia be fifia tiers atɔ̃ siwo katã le ƒuƒoƒo me ( xs, sm, md, lg, kple xl).
  • 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 orderklass yeyeawo. Le kpɔɖeŋu me, le esi teƒe be nàzã .col-8.push-4kple ..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.

Ŋlɔ ƒuƒoƒoawo ɖi

  • Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
  • Wotsɔ a.list-group-itemklass 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-flushklass kpe ɖe eŋu be woazã kple agbalẽviwo.
  • Gbugbɔ ŋlɔ akpa aɖe kple flexbox.
  • Ne míebu ʋuʋu yi flexbox ŋu la, anɔ eme be vovototodedeameme ƒe dzesiwo ƒe ɖoɖowɔwɔ le tanya la me gblẽ 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 remotetiatia (si woateŋu azã atsɔ atsɔ gotagomenyawo ade modal me le wo ɖokui si ahade wo me) kple loaded.bs.modalnudzɔ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 .navs, .nav-items, kple .nav-links. 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 .navbarklass 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-defaultnye fifia .navbar-light, togbɔ be .navbar-darkegakpɔtɔ le nenema hã. Wobiaa esiawo dometɔ ɖeka le navbar ɖesiaɖe dzi. Gake hatsotso siawo megaɖoa background-colors o; ke boŋ ɖeko wokpɔa ŋusẽ ɖe color.
  • 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-togglenye fifia eye atsyã vovovowo kple dzesi ememetɔ le esi ( s .navbar-toggleretɔ̃ megali o ).<span>
  • Woɖe asi le .navbar-formklass la ŋu keŋkeŋ. Megahiã o; ke boŋ zã .form-inlinemargin utilities ko eye nàwɔ wo ŋudɔ alesi wòhiãe.
  • Navbars megadea eme margin-bottomalo border-radiusle 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.

Axawo dzi nɔnɔ

  • 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 .pagerakpaa ɖ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 .breadcrumbs ƒe dzidzimeviwo dzi

Ŋkɔgbalẽviwo kple akɔtagbalẽviwo

  • Woƒo wo nu ƒu .labeleye .badgewoaɖ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-pillabe 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-defaultwoɖe asi le eŋu eye .badge-secondarywotsɔe kpe ɖe eŋu be wòasɔ kple component modifier class siwo wozã le teƒe bubuwo.

Panelwo, nɔnɔmetata suewo, kple vudowo

Woɖe asi le eŋu keŋkeŋ na kaɖi ƒe akpa yeyea.

Panelwo ƒe akpawo

  • .panelto .card, si wotsɔ flexbox tu fifia.
  • .panel-defaultwoɖee ɖa eye womegaɖɔli ame aɖeke o.
  • .panel-groupwoɖee ɖa eye womegaɖɔli ame aɖeke o. .card-groupmenye nusi woatsɔ aɖo eteƒe o, ke boŋ eto vovo.
  • .panel-headingyi.card-header
  • .panel-titlebe .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-titletogbɔ be wotsɔ ŋkɔ nɛ nenema ke hã la, enaa dzedzeme to vovo na .panel-title.
  • .panel-bodyyi.card-body
  • .panel-footeryi.card-footer
  • .panel-primary, .panel-success, .panel-info, .panel-warning, eye .panel-dangerwoɖe asi le wo ŋu na .bg-, .text-, kple .borderdɔwɔnu siwo wowɔ tso míaƒe $theme-colorsSass anyigbatata dzi.

Ŋgᴐyiyi

  • 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 zua class="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 .rightwole fifia .carousel-item-next, .carousel-item-prev, .carousel-item-left, kple .carousel-item-right.
    • .itemhã nye fifia .carousel-item.
    • Le prev/next dziɖuɖuwo gome la, .carousel-control.righteye .carousel-control.leftwole fifia .carousel-control-nextkple .carousel-control-prev, si fia be womegahiã gɔmeɖoanyi ƒe hatsotso tɔxɛ aɖe o.
  • 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.

Kplɔ̃wo

  • 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.

Dɔwɔnu Siwo Wozãna

  • Ðeɖefia, ɣaɣla, kple bubuwo:
    • Ena ɖeɖefia ƒe dɔwɔnuwo wɔa dɔ (le kpɔɖeŋu me, .d-nonekple d-{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-printbe 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-lefteye .pull-rightesi wònye be wole redundant na .float-leftkple .float-right.
  • Ƒ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 .
  • Ðoɖowɔwɔ ɖe ɖoɖo nu kple dometsotso:
  • Wotrɔ asi le Clearfix ŋu be wòaɖe asi le kpekpeɖeŋunana web-browser ƒe tɔtrɔ xoxowo ŋu.

Nudzrala ƒe ŋgɔdonya mixins

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

Nuŋlɔɖiwo wɔwɔ

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.rbwozãna tsɔ ŋlɔa nya siwo le míaƒe browser ƒe vodadawo ƒe axaa dzi la nyuie.
    • example.rbnye custom fork na default highlight.rbplugin, si ɖe mɔ na kpɔɖeŋu-code zazã bɔbɔe wu.
    • callout.rbnye 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.

Dɔwɔnu siwo wɔa dɔ ɖe ame dzi

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-breakpointsSass ƒ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 .hiddenkple .showklassawo ɖ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 abe style="display: none;"kple style="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
  • 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

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-*-noneklass ɖeka kple klass ɖeka nu ƒu .d-*-blockatsɔ 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-noneeɖ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.