PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
← All changes | src/Agent/lib/computed-styles.js +9 -3 3.1.6 → 3.2.2 View file →
@@ -17,12 +17,18 @@
17 17 'borderColor',
18 18 'boxShadow',
19 19 'padding',
20 20 'margin',
21 + 'minHeight',
21 22 ];
22 23
23 -const isEmptyValue = (value) =>
24 - !value || value === 'normal' || value === 'none' || value === 'auto';
24 +// Every block computes a min-height; only a set one is a size to step from.
25 +const isEmptyValue = (value, prop) =>
26 + !value ||
27 + value === 'normal' ||
28 + value === 'none' ||
29 + value === 'auto' ||
30 + (prop === 'minHeight' && value === '0px');
25 31
26 32 export const readComputedStyles = (el) => {
27 33 if (!el?.ownerDocument?.defaultView) return null;
28 34 const cs = el.ownerDocument.defaultView.getComputedStyle(el);
@@ -28,8 +34,8 @@
28 34 const cs = el.ownerDocument.defaultView.getComputedStyle(el);
29 35 const out = {};
30 36 for (const prop of ALLOWLIST) {
31 37 const value = cs[prop];
32 - if (!isEmptyValue(value)) out[prop] = value;
38 + if (!isEmptyValue(value, prop)) out[prop] = value;
33 39 }
34 40 return Object.keys(out).length ? out : null;
35 41 };