ከ2.x ወደ 3.0 በመሰደድ ላይ

Bootstrap 3 ከ v2.x ጋር ወደ ኋላ ተኳሃኝ አይደለም። ይህንን ክፍል ከ v2.x ወደ v3.0 ለማሻሻል እንደ አጠቃላይ መመሪያ ይጠቀሙ። ለሰፊ አጠቃላይ እይታ በv3.0 የተለቀቀው ማስታወቂያ ላይ ምን አዲስ ነገር እንዳለ ይመልከቱ።

ዋና ክፍል ለውጦች

ይህ ሰንጠረዥ በ v2.x እና v3.0 መካከል ያለውን የቅጥ ለውጦች ያሳያል።

ማስነሻ 2.x ማስነሻ 3.0
.row-fluid .row
.span* .col-md-*
.offset* .col-md-offset-*
.brand .navbar-brand
.navbar .nav .navbar-nav
.nav-collapse .navbar-collapse
.nav-toggle .navbar-toggle
.btn-navbar .navbar-btn
.hero-unit .jumbotron
.icon-* .glyphicon .glyphicon-*
.btn .btn .btn-default
.btn-mini .btn-xs
.btn-small .btn-sm
.btn-large .btn-lg
.alert .alert .alert-warning
.alert-error .alert-danger
.visible-phone .visible-xs
.visible-tablet .visible-sm
.visible-desktop ተከፋፈለ.visible-md .visible-lg
.hidden-phone .hidden-xs
.hidden-tablet .hidden-sm
.hidden-desktop ተከፋፈለ.hidden-md .hidden-lg
.input-block-level .form-control
.control-group .form-group
.control-group.warning .control-group.error .control-group.success .form-group.has-*
.checkbox.inline .radio.inline .checkbox-inline .radio-inline
.input-prepend .input-append .input-group
.add-on .input-group-addon
.img-polaroid .img-thumbnail
ul.unstyled .list-unstyled
ul.inline .list-inline
.muted .text-muted
.label .label .label-default
.label-important .label-danger
.text-error .text-danger
.table .error .table .danger
.bar .progress-bar
.bar-* .progress-bar-*
.accordion .panel-group
.accordion-group .panel .panel-default
.accordion-heading .panel-heading
.accordion-body .panel-collapse
.accordion-inner .panel-body

ምን አዲስ ነገር አለ

አዲስ አባሎችን አክለናል እና አንዳንድ ያሉትን ቀይረናል። አዲሶቹ ወይም የተሻሻሉ ቅጦች እነኚሁና።

ንጥረ ነገር መግለጫ
ፓነሎች .panel .panel-default .panel-body .panel-title .panel-heading .panel-footer .panel-collapse
ቡድኖችን ዘርዝር .list-group .list-group-item .list-group-item-text .list-group-item-heading
ግሊፊኮንስ .glyphicon
Jumbotron .jumbotron
ተጨማሪ ትንሽ ፍርግርግ (<768px) .col-xs-*
አነስተኛ ፍርግርግ (≥768 ፒክስል) .col-sm-*
መካከለኛ ፍርግርግ (≥992 ፒክስል) .col-md-*
ትልቅ ፍርግርግ (≥1200 ፒክስል) .col-lg-*
ምላሽ ሰጪ የመገልገያ ክፍሎች (≥1200 ፒክስል) .visible-lg .hidden-lg
ማካካሻዎች .col-sm-offset-* .col-md-offset-* .col-lg-offset-*
ግፋ .col-sm-push-* .col-md-push-* .col-lg-push-*
ጎትት .col-sm-pull-* .col-md-pull-* .col-lg-pull-*
የግቤት ቁመት መጠኖች .input-sm .input-lg
የግቤት ቡድኖች .input-group .input-group-addon .input-group-btn
የቅጽ መቆጣጠሪያዎች .form-control .form-group
የቡድን መጠኖች አዝራር .btn-group-xs .btn-group-sm .btn-group-lg
Navbar ጽሑፍ .navbar-text
የናቭባር ራስጌ .navbar-header
የተረጋገጡ ትሮች / እንክብሎች .nav-justified
ምላሽ ሰጪ ምስሎች .img-responsive
የአውድ ሰንጠረዥ ረድፎች .success .danger .warning .active .info
አውዳዊ ፓነሎች .panel-success .panel-danger .panel-warning .panel-info
ሞዳል .modal-dialog .modal-content
ድንክዬ ምስል .img-thumbnail
የጉድጓድ መጠኖች .well-sm .well-lg
ማንቂያ አገናኞች .alert-link

ምን ተወግዷል

በ v3.0 ውስጥ የሚከተሉት ንጥረ ነገሮች ተጥለዋል ወይም ተለውጠዋል።

ንጥረ ነገር ከ2.x ተወግዷል 3.0 ተመጣጣኝ
የቅጽ ድርጊቶች .form-actions ኤን/ኤ
የፍለጋ ቅጽ .form-search ኤን/ኤ
ከመረጃ ጋር ቡድን ይፍጠሩ .control-group.info ኤን/ኤ
ቋሚ-ስፋት የግቤት መጠኖች .input-mini .input-small .input-medium .input-large .input-xlarge .input-xxlarge በምትኩ የፍርግርግ.form-control ስርዓቱን ይጠቀሙ ።
የደረጃ ቅጽ ግቤትን አግድ .input-block-level ምንም ቀጥተኛ አቻ የለም፣ ግን የቅጾች መቆጣጠሪያዎች ተመሳሳይ ናቸው።
የተገላቢጦሽ አዝራሮች .btn-inverse ኤን/ኤ
ፈሳሽ ረድፍ .row-fluid .row(ከዚህ በኋላ ቋሚ ፍርግርግ የለም)
መጠቅለያ ይቆጣጠራል .controls ኤን/ኤ
ረድፍ ይቆጣጠራል .controls-row .rowወይም.form-group
የናቭባር ውስጣዊ .navbar-inner ኤን/ኤ
የናቭባር ቀጥ ያሉ አካፋዮች .navbar .divider-vertical ኤን/ኤ
ተቆልቋይ ንዑስ ምናሌ .dropdown-submenu ኤን/ኤ
የትር አሰላለፍ .tabs-left .tabs-right .tabs-below ኤን/ኤ
Pill-based tabbable area .pill-content .tab-content
Pill-based tabbable area pane .pill-pane .tab-pane
Nav lists .nav-list .nav-header No direct equivalent, but list groups and .panel-groups are similar.
Inline help for form controls .help-inline No exact equivalent, but .help-block is similar.
Non-bar-level progress colors .progress-info .progress-success .progress-warning .progress-danger Use .progress-bar-* on the .progress-bar instead.

Additional notes

Other changes in v3.0 are not immediately apparent. Base classes, key styles, and behaviors have been adjusted for flexibility and our mobile first approach. Here's a partial list:

  • By default, text-based form controls now receive only minimal styling. For focus colors and rounded corners, apply the .form-control class on the element to style.
  • Text-based form controls with the .form-control class applied are now 100% wide by default. Wrap inputs inside <div class="col-*"></div> to control input widths.
  • .badge no longer has contextual (-success,-primary,etc..) classes.
  • .btn must also use .btn-default to get the "default" button.
  • .row is now fluid.
  • Images are no longer responsive by default. Use .img-responsive for fluid <img> size.
  • The icons, now .glyphicon, are now font based. Icons also require a base and icon class (e.g. .glyphicon .glyphicon-asterisk).
  • Typeahead has been dropped, in favor of using Twitter Typeahead.
  • Modal markup has changed significantly. The .modal-header, .modal-body, and .modal-footer sections are now wrapped in .modal-content and .modal-dialog for better mobile styling and behavior. Also, you should no longer apply .hide to .modal in your markup.
  • As of v3.1.0, the HTML loaded by the remote modal option is now injected into the .modal-content (from v3.0.0 to v3.0.3, into the .modal) instead of into the .modal-body. This allows you to also easily vary the header and footer of the modal, not just the modal body.
  • The checkbox and radio features of the button.js plugin now both use data-toggle="buttons" instead of data-toggle="buttons-checkbox" or data-toggle="buttons-radio" in their markup.
  • የጃቫስክሪፕት ክስተቶች በስም ተከፋፍለዋል። ለምሳሌ፣ የሞዳል "ሾው" ክስተትን ለመቆጣጠር፣ ተጠቀም 'show.bs.modal'። ለ "ትሮች" ተጠቀም 'shown.bs.tab', ወዘተ.

ለበለጠ መረጃ ወደ v3.0 ማሻሻል እና ከማህበረሰቡ የመጡ የኮድ ቅንጥቦችን ለማግኘት Bootply ን ይመልከቱ ።