From 4c7d84b96801cb2f0b9d79b98383e0968eb7cf92 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 27 Nov 2024 17:37:54 +0300 Subject: [PATCH] Adjust browse line/icon height/alignment for text-only zooming --- app/assets/stylesheets/common.scss | 6 +++++- app/helpers/browse_helper.rb | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 188df0d639..c2b7d34f60 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -961,7 +961,11 @@ img.trace_image { /* Rules for map sidebar icons */ .browse-section .browse-element-list { - line-height: 20px; + line-height: 1.25rem; + + .browse-icon { + height: max(20px, 1.25rem); + } @include color-mode(dark) { .browse-icon-invertable { diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index dc4c8b2698..b7a4f7a194 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -49,7 +49,7 @@ def element_icon(type, object) image_tag "browse/#{icon_data[:filename]}", :size => 20, - :class => ["object-fit-none", { "browse-icon-invertable" => icon_data[:invert] }], + :class => ["object-fit-none browse-icon", { "browse-icon-invertable" => icon_data[:invert] }], :title => title end @@ -62,7 +62,7 @@ def element_single_current_link(type, object) end def element_list_item(type, object, &) - tag.li(tag.div(element_icon(type, object) + tag.div(&), :class => "d-flex gap-1")) + tag.li(tag.div(element_icon(type, object) + tag.div(:class => "align-self-center", &), :class => "d-flex gap-1")) end def element_list_item_with_strikethrough(type, object, &)