Bootstrap 4 to 5 Migration - Search for breaking changes
Please e-mail if you discover any errors or omissions
'use strict';
/* Comments are css for BS5 */
let bs5breaking = [
'arrow', /* popover-arrow */
'badge-\\w+', /* bg-* */
'badge-pill', /* rounded-pill */
'border-left-\\w', /* border-start-* */
'border-right-\\w', /* border-end-* */
'btn-block', /* btn only. No longer works as general utility */
'card', /* No longer applies to accordians */
'card-columns', /* - */
'card-deck', /* - */
'close', /* btn-close */
'custom-check', /* form-check */
'custom-file', /* replaced by custom styles on top of .form-control */
'custom-range', /* form-range */
'custom-select', /* form-select */
'data-whiteList', /* data-bs-allowList */
'data-toggle', /* data-bs-toggle */
'data-target', /* data-bs-target */
'data-dismiss', /* data-bs-dismiss */
'data-slide', /* data-bs-slide */
'data-ride', /* data-bs-ride */
'data-interval', /* data-bs-interval */
'data-spy', /* data-bs-spy */
'data-[^b]\\w', /* data-bs-* */
'embed-responsive-item',/* - */
'float-left', /* float-start */
'float-right', /* float-end */
'font-style-\\w', /* fst-* */
'font-weight-\\w', /* fw-* */
'form-control-file', /* - */
'form-control-range', /* - */
'form-group', /* use grid utilities */
'form-inline', /* use grid utilities */
'form-row', /* row */
'input-group-append', /* - */
'input-group-prepend', /* - */
'jumbotron', /* p-5 bg-body-tertiary rounded-3 */
'left-\\w', /* start-* */
'media', /* media-* */
'ml-\\d', /* ms-* */
'mr-\\d', /* me-* */
'no-gutters', /* g-0 */
'order-\\d', /* Only order-1 to order-5 */
'pl-\\d', /* ps-* */
'pr-\\d', /* pe-* */
'pre-scrollable', /* - */
'right-\\w', /* end-* */
'rounded-left', /* rounded-start */
'rounded-lg', /* rounded-3 */
'rounded-right', /* rounded-end */
'rounded-sm', /* rounded-1 */
'sr-only', /* visually-hidden */
'text-hide', /* - */
'text-justify', /* - */
'text-left', /* text-start */
'text-monospace', /* font-monospace */
'text-right', /* text-end */
'thead-dark', /* table-dark on desired row or cells */
'thead-light', /* table-light on desired row or cells */
''
];
var expr = "";
for (var i = 0; i < bs5breaking.length; i++) {
if (bs5breaking[i].length)
expr += "|\\b" + bs5breaking[i].replace(/-/g, "\\-") + "\\b";
}
//expr = "class *= *['\"].*(" + expr.substr(1) + ")['\"]";
expr = "(" + expr.substr(1) + ")";
let res = document.getElementById('results');
if (res) res.innerText = expr;