From 65b85031fb5688361c077bc04e641e4b502671e1 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 10 Jul 2023 18:33:05 +0200 Subject: CSS: Make the reliableTrDimensions support test work with Bootstrap CSS Bootstrap 5 includes the following CSS on the page: ```css *, *::before, *::after { box-sizing: border-box; } ``` That threw our `reliableTrDimensions` support test off. This change fixes the support test and adds a unit test ensuring support test values on a page including Bootstrap 5 CSS are the same as on a page without it. Fixes gh-5270 Closes gh-5278 Ref gh-5279 --- src/css/support.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/css/support.js b/src/css/support.js index 48f95dc36..cf9f0cfcd 100644 --- a/src/css/support.js +++ b/src/css/support.js @@ -25,7 +25,7 @@ support.reliableTrDimensions = function() { tr = document.createElement( "tr" ); table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "border:1px solid"; + tr.style.cssText = "box-sizing:content-box;border:1px solid"; // Support: Chrome 86+ // Height set through cssText does not get applied. @@ -38,7 +38,7 @@ support.reliableTrDimensions = function() { // display for all div elements is set to "inline", // which causes a problem only in Android Chrome, but // not consistently across all devices. - // Ensuring the div is display: block + // Ensuring the div is `display: block` // gets around this issue. div.style.display = "block"; -- cgit v1.2.3