vanilla-match-height
Advanced tools
Comparing version 0.0.1 to 0.0.2
<a name="0.0.1"></a> | ||
# 0.0.2 (2023-11-18) | ||
### fix display | ||
- initial release | ||
- | ||
<a name="0.0.1"></a> | ||
# 0.0.1 (2023-11-18) | ||
@@ -3,0 +10,0 @@ |
/** | ||
* vanilla-match-height master by @mitera | ||
* vanilla-match-height v0.0.2 by @mitera | ||
* Simone Miterangelis <simone@mite.it> | ||
@@ -202,4 +202,4 @@ * License: MIT | ||
// temporarily force a usable display value | ||
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') { | ||
display = 'block'; | ||
if (display && (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex')) { | ||
display = 'display: block; '; | ||
} | ||
@@ -210,3 +210,3 @@ | ||
// reset style | ||
$that.setAttribute('style', 'display: ' + display + '; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; border-top-width: 0; border-bottom-width: 0; height: 100px; overflow: hidden;'); | ||
$that.setAttribute('style', display + 'padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; border-top-width: 0; border-bottom-width: 0; height: 100px; overflow: hidden;'); | ||
}); | ||
@@ -242,9 +242,8 @@ | ||
// temporarily force a usable display value | ||
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') { | ||
display = 'block'; | ||
if (display && (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex')) { | ||
display = 'display: block;'; | ||
// ensure we get the correct actual height (and not a previously set height value) | ||
$that.setAttribute('style', display); | ||
} | ||
// ensure we get the correct actual height (and not a previously set height value) | ||
$that.setAttribute('style', 'display:' + display + ';'); | ||
// find the max height (including padding, but not margin) | ||
@@ -251,0 +250,0 @@ var isTarget = true; |
{ | ||
"name": "vanilla-match-height", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"license": "MIT", | ||
"author": "Simone Miterangelis <simone@mite.it>", | ||
"description": "a vanilla responsive equal heights", | ||
"main": "dist/vanilla.matchHeight.js", | ||
"main": "dist/vanilla-match-height.js", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
/** | ||
* vanilla-match-height master by @mitera | ||
* vanilla-match-height v0.0.2 by @mitera | ||
* Simone Miterangelis <simone@mite.it> | ||
@@ -202,4 +202,4 @@ * License: MIT | ||
// temporarily force a usable display value | ||
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') { | ||
display = 'block'; | ||
if (display && (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex')) { | ||
display = 'display: block; '; | ||
} | ||
@@ -210,3 +210,3 @@ | ||
// reset style | ||
$that.setAttribute('style', 'display: ' + display + '; padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; border-top-width: 0; border-bottom-width: 0; height: 100px; overflow: hidden;'); | ||
$that.setAttribute('style', display + 'padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; border-top-width: 0; border-bottom-width: 0; height: 100px; overflow: hidden;'); | ||
}); | ||
@@ -242,9 +242,8 @@ | ||
// temporarily force a usable display value | ||
if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') { | ||
display = 'block'; | ||
if (display && (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex')) { | ||
display = 'display: block;'; | ||
// ensure we get the correct actual height (and not a previously set height value) | ||
$that.setAttribute('style', display); | ||
} | ||
// ensure we get the correct actual height (and not a previously set height value) | ||
$that.setAttribute('style', 'display:' + display + ';'); | ||
// find the max height (including padding, but not margin) | ||
@@ -251,0 +250,0 @@ var isTarget = true; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159846
14