@bebranded/bb-contents 1.0.153 → 1.0.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bb-contents.js +13 -2
- package/package.json +1 -1
package/bb-contents.js
CHANGED
|
@@ -321,15 +321,26 @@
|
|
|
321
321
|
const useAutoHeight = isVertical && height === 'auto';
|
|
322
322
|
|
|
323
323
|
// Vérifier le overflow du parent pour respecter overflow: visible
|
|
324
|
+
// Si le parent a overflow: visible, on laisse passer
|
|
325
|
+
// Sinon (hidden, clip, auto, scroll), on contient les logos avec overflow: hidden
|
|
324
326
|
const parentComputedStyle = getComputedStyle(element);
|
|
325
327
|
const parentOverflow = parentComputedStyle.overflow;
|
|
326
|
-
const
|
|
328
|
+
const parentOverflowX = parentComputedStyle.overflowX;
|
|
329
|
+
const parentOverflowY = parentComputedStyle.overflowY;
|
|
330
|
+
|
|
331
|
+
// Vérifier si le parent a explicitement overflow: visible (ou les deux axes)
|
|
332
|
+
const isParentOverflowVisible = (parentOverflow === 'visible' || parentOverflow === '') &&
|
|
333
|
+
(parentOverflowX === 'visible' || parentOverflowX === '') &&
|
|
334
|
+
(parentOverflowY === 'visible' || parentOverflowY === '');
|
|
335
|
+
|
|
336
|
+
// Si le parent a overflow: visible, on laisse passer, sinon on contient avec hidden
|
|
337
|
+
const mainContainerOverflow = isParentOverflowVisible ? 'visible' : 'hidden';
|
|
327
338
|
|
|
328
339
|
mainContainer.style.cssText = `
|
|
329
340
|
position: relative;
|
|
330
341
|
width: 100%;
|
|
331
342
|
height: ${isVertical ? (height === 'auto' ? 'auto' : height + 'px') : 'auto'};
|
|
332
|
-
|
|
343
|
+
overflow: ${mainContainerOverflow};
|
|
333
344
|
min-height: auto;
|
|
334
345
|
${minHeight ? `min-height: ${minHeight};` : ''}
|
|
335
346
|
`;
|