From 2f89a76e0814195929a013692a80b7b4941b6b87 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 11 Dec 2023 11:32:37 +0100 Subject: [PATCH] Add minimal CSS for kbd tag --- umap/static/umap/base.css | 10 ++++++++++ umap/static/umap/js/umap.core.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index b7713a5a..78b7c342 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -47,6 +47,16 @@ p { margin-top: 14px; margin-bottom: 14px; } +kbd { + border: 1px solid #b4b4b4; + box-shadow: + 0 1px 1px rgba(0, 0, 0, 0.2), + 0 2px 0 0 rgba(255, 255, 255, 0.7) inset; + border-radius: 3px; + padding: 1px 4px; + display: inline-block; + white-space: nowrap; +} /* * List diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index 0ab38188..868fef9a 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -488,7 +488,7 @@ L.U.Help = L.Class.extend({ shortcut = shortcut.split('+').map((el) => `${el}`).join('+') } const modifier = this.isMacOS ? 'Cmd' : 'Ctrl' - label += ` (${shortcut.replace('Modifier', modifier)})` + label += ` ${shortcut.replace('Modifier', modifier)}` return label },