Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
286a924fe4 | ||
|
|
3e9e2e899d |
@@ -212,6 +212,20 @@ button,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.holdemBtn {
|
.holdemBtn {
|
||||||
|
/* Stated, because this class is worn by both <button> and <a> and the browser
|
||||||
|
does not give them the same box. Chromium's own stylesheet makes a button
|
||||||
|
border-box and leaves a link content-box, so `min-height: 46px` on the header
|
||||||
|
row came out as 46px on the buttons and 64px on the two links — and the row
|
||||||
|
stretches to its tallest item, so every button became 64px too. A 46px touch
|
||||||
|
target was quietly costing 64px of a phone screen, twice over, because the
|
||||||
|
header wraps to two rows. */
|
||||||
|
box-sizing: border-box;
|
||||||
|
/* And the touch floor is stated here rather than only under a width breakpoint.
|
||||||
|
It used to arrive by accident — the content-box links were 64px tall and the
|
||||||
|
row stretched everything to match — so once the boxes agree, a landscape phone
|
||||||
|
(wider than the phone breakpoint, still a thumb) would have been left with 42px
|
||||||
|
buttons. 44px is the floor everywhere; the narrow layout still asks for 46. */
|
||||||
|
min-height: 44px;
|
||||||
background: linear-gradient(180deg, #2e2e2e, #232323);
|
background: linear-gradient(180deg, #2e2e2e, #232323);
|
||||||
color: #eee;
|
color: #eee;
|
||||||
border: 1px solid #3a3a3a;
|
border: 1px solid #3a3a3a;
|
||||||
@@ -695,6 +709,23 @@ button,
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Seats on the bottom of the ring wear their badge underneath, because that's the
|
||||||
|
edge the pot isn't on. Bets sit between a seat and the pot, so on the bottom arc
|
||||||
|
the chip comes down onto the seat's top edge — which is exactly where this badge
|
||||||
|
was, and the chip is a layer above it. See render.js for the measurement. */
|
||||||
|
.seat.seatBelowCentre .blindBadge {
|
||||||
|
top: auto;
|
||||||
|
bottom: -9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* And the badge outranks the chips regardless, so a layout this doesn't anticipate
|
||||||
|
can't hide it again. Which blind a seat is posting is the one thing on that puck
|
||||||
|
nothing else on the felt repeats — a bet chip's amount is on the seat's own total
|
||||||
|
line as well. Measured across 12 table sizes: no chip loses its amount to this. */
|
||||||
|
.blindBadge {
|
||||||
|
z-index: 4;
|
||||||
|
}
|
||||||
|
|
||||||
/* Both badges failed WCAG AA against their own gradients — measured at the worst
|
/* Both badges failed WCAG AA against their own gradients — measured at the worst
|
||||||
stop, the small blind was 3.52:1 and the big blind 2.15:1, in 9px bold text a
|
stop, the small blind was 3.52:1 and the big blind 2.15:1, in 9px bold text a
|
||||||
dealer is meant to read at a glance across a table.
|
dealer is meant to read at a glance across a table.
|
||||||
|
|||||||
@@ -171,6 +171,16 @@ const Render = {
|
|||||||
node.style.top = `${pos.top}%`;
|
node.style.top = `${pos.top}%`;
|
||||||
node.dataset.seatIndex = String(index);
|
node.dataset.seatIndex = String(index);
|
||||||
|
|
||||||
|
// Which side of the seat the pot is on, which is the side its bet chip
|
||||||
|
// arrives from — the chip sits on the same spoke, closer in. For a seat on
|
||||||
|
// the top of the ring that's from below; on the bottom, from above.
|
||||||
|
//
|
||||||
|
// The blind badge has to be on the other side or the chip lands on top of
|
||||||
|
// it. Measured on a 390px phone: the big blind's own $2 chip covered 196 of
|
||||||
|
// the badge's 288 square pixels, and it sits a layer higher, so the marker
|
||||||
|
// telling the dealer who the big blind is was simply gone.
|
||||||
|
node.classList.toggle("seatBelowCentre", pos.top > 50);
|
||||||
|
|
||||||
node.querySelector(".seatChairNumber").textContent = index + 1;
|
node.querySelector(".seatChairNumber").textContent = index + 1;
|
||||||
|
|
||||||
const dealerChip = node.querySelector(".dealerChip");
|
const dealerChip = node.querySelector(".dealerChip");
|
||||||
|
|||||||
Reference in New Issue
Block a user