From c38ec2c18d701d6c1a5fc4b828e8e5228417fe7e Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 8 Apr 2025 10:30:29 +0200 Subject: [PATCH] fix: fix copiable input CSS --- umap/static/umap/css/form.css | 13 +++++-------- umap/static/umap/css/icon.css | 2 +- umap/static/umap/img/16-white.svg | 2 +- umap/static/umap/img/16.svg | 2 +- umap/static/umap/img/24-white.svg | 1 + umap/static/umap/img/24.svg | 3 ++- umap/static/umap/img/source/16-white.svg | 6 +++--- umap/static/umap/img/source/16.svg | 2 +- umap/static/umap/img/source/24-white.svg | 5 +++-- umap/static/umap/img/source/24.svg | 9 +++++---- umap/static/umap/js/umap.core.js | 8 ++++++-- umap/static/umap/map.css | 2 +- 12 files changed, 30 insertions(+), 25 deletions(-) diff --git a/umap/static/umap/css/form.css b/umap/static/umap/css/form.css index 6e36e37b..b47d6a25 100644 --- a/umap/static/umap/css/form.css +++ b/umap/static/umap/css/form.css @@ -14,7 +14,6 @@ input[type="url"], textarea { margin: 0; padding: .5rem 1rem; width: 100%; - line-height: inherit; min-height: 40px; } input[type="range"] { @@ -611,13 +610,11 @@ input[type=hidden].blur + [type="button"] { border-radius: initial; } .copiable-input button { - background-position: -46px -92px; - display: inline; - padding: 0 10px; - height: 32px; - width: 32px; - border: 1px solid #202425; - border-radius: initial; + background-color: var(--background-color); + color: var(--text-color); + border: 2px solid var(--color-darkBlue); + border-left: none; + width: 40px; } input.highlightable:not(:placeholder-shown) { border: 1px solid var(--color-brightCyan); diff --git a/umap/static/umap/css/icon.css b/umap/static/umap/css/icon.css index 30d5ce3b..c59472c9 100644 --- a/umap/static/umap/css/icon.css +++ b/umap/static/umap/css/icon.css @@ -75,7 +75,7 @@ html[dir="rtl"] .icon { background-position: calc(var(--tile) * 4) 0; } .icon-copy { - background-position: calc(var(--tile) * 2) calc(var(--tile) * 4); + background-position: calc(var(--tile) * 4) calc(var(--tile) * 7); } .icon-delete { background-position: calc(var(--tile) * 5) calc(var(--tile) * 2); diff --git a/umap/static/umap/img/16-white.svg b/umap/static/umap/img/16-white.svg index eae286ae..e50d7d43 100644 --- a/umap/static/umap/img/16-white.svg +++ b/umap/static/umap/img/16-white.svg @@ -202,7 +202,7 @@ - + diff --git a/umap/static/umap/img/16.svg b/umap/static/umap/img/16.svg index eb32402f..caabe376 100644 --- a/umap/static/umap/img/16.svg +++ b/umap/static/umap/img/16.svg @@ -1 +1 @@ -image/svg+xml   +image/svg+xml   diff --git a/umap/static/umap/img/24-white.svg b/umap/static/umap/img/24-white.svg index 6c85d369..2a613643 100644 --- a/umap/static/umap/img/24-white.svg +++ b/umap/static/umap/img/24-white.svg @@ -62,5 +62,6 @@ + diff --git a/umap/static/umap/img/24.svg b/umap/static/umap/img/24.svg index 8ae40765..bee252b5 100644 --- a/umap/static/umap/img/24.svg +++ b/umap/static/umap/img/24.svg @@ -31,7 +31,7 @@ - + @@ -97,5 +97,6 @@ + diff --git a/umap/static/umap/img/source/16-white.svg b/umap/static/umap/img/source/16-white.svg index 34efb72f..09361461 100644 --- a/umap/static/umap/img/source/16-white.svg +++ b/umap/static/umap/img/source/16-white.svg @@ -1,7 +1,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -213,7 +213,7 @@ - + diff --git a/umap/static/umap/img/source/16.svg b/umap/static/umap/img/source/16.svg index d264c313..95b586ba 100644 --- a/umap/static/umap/img/source/16.svg +++ b/umap/static/umap/img/source/16.svg @@ -1,4 +1,4 @@ -image/svg+xml   +image/svg+xml   diff --git a/umap/static/umap/img/source/24-white.svg b/umap/static/umap/img/source/24-white.svg index c9b012b3..4e711591 100644 --- a/umap/static/umap/img/source/24-white.svg +++ b/umap/static/umap/img/source/24-white.svg @@ -1,8 +1,8 @@ - - + + @@ -77,5 +77,6 @@ + diff --git a/umap/static/umap/img/source/24.svg b/umap/static/umap/img/source/24.svg index 72eddd1b..6ef82396 100644 --- a/umap/static/umap/img/source/24.svg +++ b/umap/static/umap/img/source/24.svg @@ -1,8 +1,8 @@ - - + + @@ -44,7 +44,7 @@ - + @@ -77,7 +77,7 @@ - + @@ -110,5 +110,6 @@ + diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index 0ddc7cba..ffd4ff4f 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -113,8 +113,12 @@ L.DomUtil.createCopiableInput = (parent, label, value) => { input.type = 'text' input.readOnly = true input.value = value - const button = L.DomUtil.createButtonIcon(wrapper, 'icon-copy', L._('copy'), () => - L.Util.copyToClipboard(input.value) + const button = L.DomUtil.createButtonIcon( + wrapper, + 'icon-copy', + L._('copy'), + () => L.Util.copyToClipboard(input.value), + 24 ) button.type = 'button' return input diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 71a5e83e..bea17a79 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -118,7 +118,7 @@ html[dir="rtl"] .leaflet-tooltip-pane > * { display: none; } .leaflet-control-embed [type="button"] { - background-position: -72px -108px; + background-position: 0 -180px; } .leaflet-control-tilelayers [type="button"] { background-position: -72px 0;