From 2719a31516c15863b770e6cd86da75e822df8926 Mon Sep 17 00:00:00 2001 From: Gordon Pedersen Date: Tue, 29 Nov 2022 17:37:39 +1100 Subject: [PATCH] more tiny tweaks --- js/button-input.js | 8 ++++++++ styles.css | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/js/button-input.js b/js/button-input.js index c5ad677..40b18e9 100644 --- a/js/button-input.js +++ b/js/button-input.js @@ -42,8 +42,16 @@ function buttonInputClick() { this.style.display = null } }) + + input.addEventListener("keypress", function(event) { + if (event.key === "Enter") { + event.preventDefault(); + button.click(); + } + }); this.parentNode.insertBefore(buttonInput, this.nextSibling) + input.focus() } document.addEventListener('DOMContentLoaded', () => { diff --git a/styles.css b/styles.css index 3f8aa74..3ce7638 100644 --- a/styles.css +++ b/styles.css @@ -24,6 +24,10 @@ img.u-featured { button.icon-button { line-height: 24px; + background-color: #666289; + color:#fff; + border:none; + border-radius:4px; } button.icon-button>img { max-height: 24px; @@ -33,6 +37,23 @@ button.icon-button>img { .button-input-container>label{ display:block; } +.button-input-container>input{ + background-color: #666289; + color:#fff; + border:none; + border-radius: 4px; + padding: 4px 66px 4px 6px; + margin-right: -60px; +} +.button-input-container>input:focus{ + border:none; +} +.button-input-container>button{ + background-color: #666289; + color:#fff; + border-radius: 4px; + border-color: #fff; +} i>img{ max-height: 1em; vertical-align: middle;