From c8be6c0ea7c078ba4e809942b1fbfb38208c54fa 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 | 10 +++++++++- app/helpers/browse_helper.rb | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 3a2e1077d2..40d7d66deb 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -966,7 +966,15 @@ img.trace_image { /* Rules for map sidebar icons */ .browse-section .browse-element-list { - line-height: 20px; + line-height: 1.25rem; + + .browse-icon { + height: 1.25rem; + } + + .d-flex > .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 720e61dcac..88179bde99 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -19,7 +19,7 @@ def element_icon(type, object) image_tag "browse/#{icon_data[:filename]}", :size => 20, - :class => ["align-bottom object-fit-none", { "browse-icon-invertable" => icon_data[:invert] }], + :class => ["align-bottom object-fit-none browse-icon", { "browse-icon-invertable" => icon_data[:invert] }], :title => title end @@ -32,7 +32,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, &)