From e69a279eec43eda31111ea1011d2641e9074d1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Jakse?= Date: Sun, 22 Nov 2020 11:41:00 +0100 Subject: [PATCH] handle overflow in cells --- public/trivabble.css | 6 +++++- public/trivabble.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/trivabble.css b/public/trivabble.css index 711af96..937b927 100644 --- a/public/trivabble.css +++ b/public/trivabble.css @@ -122,6 +122,8 @@ html, #board, [draggable], .tile { display:inline-block; white-space:pre-wrap; font-size:7px; + text-overflow:ellipsis; + overflow:hidden; } #center-cell .special-cell-label { @@ -186,8 +188,10 @@ button { } #board td { + width:32px; height:32px; - width: 32px; + max-width:32px; + max-height:32px; } #rack .tile-placeholder { diff --git a/public/trivabble.js b/public/trivabble.js index 2d75605..fb2f2ac 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -1491,7 +1491,7 @@ cell.firstChild.appendChild(document.createElement("span")); cell.classList.add("special-cell"); cell.classList.add("special-cell-" + type); - cell.lastChild.lastChild.textContent = _(specialTypesText[type]); + cell.lastChild.lastChild.textContent = cell.title = _(specialTypesText[type]); cell.lastChild.lastChild.className = "special-cell-label"; }