Cap object group card shared width
This commit is contained in:
1 parent
e156e99b21
commit
74b47c1ccb
1 file changed
+3
-1
@@ -117,7 +117,9 @@
|
||||
}
|
||||
|
||||
const referenceWidth = referenceCard.getBoundingClientRect().width;
|
||||
grid.style.setProperty('--layout-object-card-shared-width', `${referenceWidth}px`);
|
||||
const maxWidth = parseFloat(getComputedStyle(referenceCard).maxWidth);
|
||||
const sharedWidth = Number.isFinite(maxWidth) ? Math.min(referenceWidth, maxWidth) : referenceWidth;
|
||||
grid.style.setProperty('--layout-object-card-shared-width', `${sharedWidth}px`);
|
||||
grid.classList.add('sg-object-card-grid--multi-row');
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user