From 97b1e24facefaff8c727e7135c8dbb0a3a4c60b7 Mon Sep 17 00:00:00 2001 From: Geoff Scholl Date: Mon, 21 Oct 2024 10:05:35 -0400 Subject: [PATCH] Enhance focus on close buttons (fixes #1079) (#1147) --- .../modules/uv-dialogues-module/css/styles.less | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/content-handlers/iiif/modules/uv-dialogues-module/css/styles.less b/src/content-handlers/iiif/modules/uv-dialogues-module/css/styles.less index 3d65f2695..311331af4 100644 --- a/src/content-handlers/iiif/modules/uv-dialogues-module/css/styles.less +++ b/src/content-handlers/iiif/modules/uv-dialogues-module/css/styles.less @@ -508,6 +508,22 @@ } } + .btn.close { + padding: 0.5rem 1rem; /* Equivalent to Tailwind's px-4 py-2 */ + background-color: black; /* bg-black */ + color: white; /* text-white */ + white-space: nowrap; /* Prevent text from wrapping */ + + /* Remove default outline on focus */ + outline: none; + } + + /* Focus state styles */ + .btn.close:focus { + outline: none; + box-shadow: 0 0 0 4px rgba(37, 99, 235, 1), /* Darker blue (ring-blue-700 equivalent) */ + 0 0 0 6px white; /* Equivalent to ring-offset-2 (creates an offset ring) */ + } } @import 'mobile'; \ No newline at end of file