Skip to content

Commit

Permalink
Adjust browse line/icon height/alignment for text-only zooming
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Nov 27, 2024
1 parent afae616 commit 4c7d84b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/browse_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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, &)
Expand Down

0 comments on commit 4c7d84b

Please sign in to comment.