4.0.1 • Published 6 years ago

bs4-utilities-for-bs3 v4.0.1

Weekly downloads
100
License
MIT
Repository
github
Last release
6 years ago

Bootstrap 4's Utility Classes for Bootstrap 3

Backports Bootstrap 4's awesome utility/helper classes for use in your Bootstrap 3 project.

Using

  • Install with npm: npm install bs4-utilities-for-bs3
  • CSS only
    • <link rel="stylesheet" href="dist/css/bs4-utilities-for-bs3.css">
  • Import SASS
    • @import 'node_modules/bs4-utilities-for-bs3/src/bs4-utilities-for-bs3'
    • Tip: Avoid specifying "node_modules/" in the path by using the includePaths option.

Reference

Spacing

BS4 sizeBS3 sizeNotes
1xsEx: .mt-1 for margin-top: $padding-xs-vertical;
2smEx: .ml-2 for margin-left: $padding-sm-horizontal;
3defaultEx: .pt-3 for padding-top: $padding-base-vertical;
4lgEx: .pl-4 for padding-left: $padding-lg-horizontal;
5NABS3 doesn't have an equivalent size.

All the Things

ClassBS3Notes
.border
.border-top
.border-right
.border-bottom
.border-left
.border-0
.border-top-0
.border-right-0
.border-bottom-0
.border-left-0
.border-primary
.border-secondaryNot ported. Uses color only available in BS4.
.border-success
.border-danger
.border-warning
.border-info
.border-lightNot ported. Uses color only available in BS4.
.border-darkNot ported. Uses color only available in BS4.
.border-white
.rounded
.rounded-top
.rounded-right
.rounded-bottom
.rounded-left
.rounded-circle
.rounded-0
.clearfix
.close
.text-primary
.text-secondaryNot ported. Uses color only available in BS4.
.text-success
.text-info
.text-warning
.text-danger
.text-lightNot ported. Uses color only available in BS4.
.text-darkNot ported. Uses color only available in BS4.
.text-muted
.text-white
.bg-primary
.bg-secondaryNot ported. Uses color only available in BS4.
.bg-success
.bg-danger
.bg-warning
.bg-info
.bg-lightNot ported. Uses color only available in BS4.
.bg-darkNot ported. Uses color only available in BS4.
.bg-white
.d-noneAlso provides .d-(sm\|md\|lg)-none
.d-inlineAlso provides .d-(sm\|md\|lg)-inline
.d-inline-blockAlso provides .d-(sm\|md\|lg)-inline-block
.d-blockAlso provides .d-(sm\|md\|lg)-block
.d-tableAlso provides .d-(sm\|md\|lg)-table
.d-table-rowAlso provides .d-(sm\|md\|lg)-table-row
.d-table-cellAlso provides .d-(sm\|md\|lg)-table-cell
.d-flexAlso provides .d-(sm\|md\|lg)-flex
.d-inline-flexAlso provides .d-(sm\|md\|lg)-inline-flex
.d-print-none
.d-print-inline
.d-print-inline-block
.d-print-block
.d-print-table
.d-print-table-row
.d-print-table-cell
.d-print-flex
.d-print-inline-flex
Flexbox utilitiesToo many too list! See the Bootstrap 4 docs.
.float-leftAlso provides .float-(sm\|md\|lg)-left
.float-rightAlso provides .float-(sm\|md\|lg)-right
.float-noneAlso provides .float-(sm\|md\|lg)-none
.text-hide
.fixed-top
.fixed-bottom
.sticky-top
.sr-only
.sr-only-focusable
.w-25
.w-50
.w-75
.w-100
.h-25
.h-50
.h-75
.h-100
.mw-100
.mh-100
.m-[0-4], .m(t\|r\|b\|l\|x\|y)-[0-4]Also provides responsive, e.g. .mr-(sm\|md\|lg)-1
.m-auto, .m(t\|r\|b\|l\|x\|y)-autoAlso provides responsive, e.g. .m-(sm-md-lg)-auto
.p-[0-4], .p(t\|r\|b\|l\|x\|y)-[0-4]Also provides responsive, e.g. .pr-(sm\|md\|lg)-1
.text-justify
.text-leftAlso provides .text-(sm\|md\|lg)-left
.text-centerAlso provides .text-(sm\|md\|lg)-center
.text-rightAlso provides .text-(sm\|md\|lg)-right
.text-nowrap
.text-truncate
.text-lowercase
.text-uppercase
.text-capitalize
.font-weight-bold
.font-weight-normal
.font-weight-lightNot ported. Uses color only available in BS4.
.font-italic
.text-hide
.align-baseline
.align-top
.align-middle
.align-bottom
.align-text-top
.align-text-bottom
.visible
.invisible

Deprecated

BS3 ClassNotes
.caretNot available in BS4
.center-blockSame as .mx-auto
.showSame as .d-(inline\|block\|etc)
.hideSame as .d-none
.pull-leftSame as .float-left
.pull-rightSame as .float-right
.visible-*, .hidden-*Replaced by .d-* utilities