aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-07-10 18:33:05 +0200
committerGitHub <noreply@github.com>2023-07-10 18:33:05 +0200
commit65b85031fb5688361c077bc04e641e4b502671e1 (patch)
tree0f2c86db330f907d8a0757622bd6520e541350a5 /src
parente24218758bb21bfdc296731d70f3d48ab786e5f5 (diff)
downloadjquery-65b85031fb5688361c077bc04e641e4b502671e1.tar.gz
jquery-65b85031fb5688361c077bc04e641e4b502671e1.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/css/support.js4
1 files changed, 2 insertions, 2 deletions
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";