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 Dec 6, 2024
1 parent c1210df commit c8be6c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
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 @@ -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

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

0 comments on commit c8be6c0

Please sign in to comment.