From 2bc505741fc5c508db2d9896e96538c8a64e9e47 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 13 Jan 2025 00:28:10 +0100 Subject: [PATCH] Add styling for color pickers Note that no color picker elements are currently in use, this is for completeness. --- app/styles/input.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/styles/input.css b/app/styles/input.css index 95ae347..374b93e 100644 --- a/app/styles/input.css +++ b/app/styles/input.css @@ -209,6 +209,28 @@ input[type=submit] { overflow: clip; } +/* ------- COLOR PICKERS ------- */ + +input[type=color] { + min-width: unset; + box-sizing: content-box; + width: 1.4em; + height: 1.4em; +} +input[type=color]::-webkit-color-swatch-wrapper { + padding: 0; +} +/* -webkit-color-swatch & -moz-color-swatch cant be in a selector list: + https://bugs.chromium.org/p/chromium/issues/detail?id=1154623 */ +input[type=color]::-webkit-color-swatch { + border: none; + border-radius: 6px; +} +input[type=color]::-moz-color-swatch { + border: none; + border-radius: 6px; +} + /* -- SHARED BETWEEN CHECKBOXES AND RADIOBUTTONS -- */ input[type=radio],