This is an old question, and there have been several changes to Bootstrap over the years. One of the most common issues I encounter when I don't know what version of Bootstrap I'm using is that the header comment / docblock is missing from the file.
This answer was written after the release of 5.1.3 and 4.6.1. If you update it, please update those version numbers as well!
Here are the ways I have discovered (thanks to https://getbootstrap.com/docs/versions/ and https://github.com/twbs/bootstrap/releases) to figure out what version you're using using feature-sniffing. Note that this list only covers the CSS portion!
v5
v5.1 - added the .placeholder
and .placeholder-glow
classes
v5.0 - removed .media
and added the xxl
breakpoint (.col-xxl-12
)
v4
v4.6 - Added .navbar-nav-scroll
class
v4.5 - Added .user-select-none
, .user-select-auto
, and .user-select-none
classes
v4.4 - Added .row-cols-*
classes
v4.3 - Added .stretched-link
and .text-break
classes
v4.2 - Added .font-weight-lighter
and .font-weight-bolder
classes
v4.1 - Added .table-borderless
and .text-monospace
classes
v4.0 - Removed .img-responsive
. Added .img-fluid
v3
v3.4 - Added .row-no-gutters
class
v3.3 - Added .media-left
and .media-right
classes
v3.2 - Added .sr-only-focusable
class
v3.1 - Added .text-justify
, .modal-sm
and .modal-lg
classes
v3.0 - Removed .span#
classes. Added .col-X-#
classes
- # is a number from 1 to 12
- X is one of
xs
, sm
, md
, or lg
v2
v2.3 - Added .text-left
, .text-center
, and .text-right
classes
v2.2 - Added .media
class
v2.1 - Added .uneditable-input
and .uneditable-textarea
classes
v2.0 - Added .table
and .table-*
classes
v1
v1.4 - Added .condensed-table
class
v1.3 - Added .thumbnail
class
v1.2 - Added .one-third
.two-thirds
classes
Anything before this was not tracked reliable, from what I can tell.