From: Raphaƫl Jakse Date: Fri, 1 May 2020 09:10:53 +0000 (+0200) Subject: Style the add score button X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=a3ef7431d895baa9de12cd69d919b2ee064394bc;p=trivabble.git Style the add score button --- diff --git a/trivabble.css b/trivabble.css index 80cf566..b363807 100644 --- a/trivabble.css +++ b/trivabble.css @@ -373,18 +373,33 @@ td.blink { #participants th, #participants td { border:1px solid gray; - padding:0.33ex 1ex + padding:0.33ex 0.5ex } -#participants .score-cell { - min-width:4em; +#participants .score-cell > span { + display:inline-block; + min-width:2.5em; } -#participants .score-cell:hover, .turn-cell button:hover { +#participants .score-cell > span:hover, .turn-cell button:hover { cursor:pointer; background:#FFA } +#participants .score-cell button { + min-height: auto; + font-size:x-small; + padding:0 0.5ex; + margin:0; + background:#CCC; + color:back; + border:0; +} + +#participants .score-cell button:hover { + background:#DDD; +} + #participants th { font-weight:normal; background:#EEE; diff --git a/trivabble.js b/trivabble.js index f590d7a..59a5bdc 100644 --- a/trivabble.js +++ b/trivabble.js @@ -742,11 +742,13 @@ participants.insertBefore(row, before); row.appendChild(document.createElement("td")); row.lastChild.textContent = playerName; + row.appendChild(document.createElement("td")); + row.appendChild(document.createElement("td")); + row.lastChild.className = "score-cell"; row.lastChild.appendChild(document.createElement("span")); - row.lastChild.lastChild.className = "score-cell"; row.lastChild.lastChild.onclick = ( function (row) { return function () { @@ -775,7 +777,7 @@ }; } )(row); - + row.lastChild.appendChild(document.createTextNode(" ")); row.lastChild.appendChild(document.createElement("button")); row.lastChild.lastChild.textContent = "+"; row.lastChild.lastChild.onclick = (