Fix mobile scaling gap and remove hardcoded card opacity
This commit is contained in:
parent
9a6aa261b0
commit
ea4faa9fcf
@ -21,6 +21,10 @@
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.pyramid-layout .card:not(.is-exposed) {
|
||||
filter: brightness(0.9) grayscale(0.2);
|
||||
}
|
||||
|
||||
.pyramid-bottom-piles {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
@ -152,11 +152,13 @@
|
||||
|
||||
const rootStyle = getComputedStyle(document.documentElement);
|
||||
let cardWidth = parseFloat(rootStyle.getPropertyValue('--card-width'));
|
||||
let horizontalGap = parseFloat(rootStyle.getPropertyValue('--gap'));
|
||||
|
||||
if (isNaN(cardWidth) || cardWidth === 0) cardWidth = 80;
|
||||
if (isNaN(horizontalGap)) horizontalGap = 10;
|
||||
|
||||
const cardHeight = cardWidth * 1.4;
|
||||
const rowOverlap = 0.45;
|
||||
const horizontalGap = cardWidth * 0.15; // Proportional gap
|
||||
|
||||
const boardTop = boardRect.top;
|
||||
const boardLeft = boardRect.left;
|
||||
@ -186,8 +188,8 @@
|
||||
// Mark if it's currently playable for visual feedback
|
||||
const exposed = isExposed(card.id);
|
||||
el.classList.toggle('is-exposed', exposed);
|
||||
el.style.opacity = exposed ? '1' : '0.85';
|
||||
// el.style.filter = exposed ? 'none' : 'brightness(0.8)'; // Optional: dim unexposed cards
|
||||
// Remove hardcoded opacity, handle via CSS if needed
|
||||
el.style.opacity = '1';
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user