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 9, 2024
1 parent 5b5ffaf commit dc52cdc
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 @@ -970,7 +970,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-invertible {
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 @@ -14,7 +14,7 @@ def element_icon(type, object)

image_tag "browse/#{selected_icon_data[:filename]}",
:size => 20,
:class => ["align-bottom object-fit-none", { "browse-icon-invertible" => selected_icon_data[:invert] }],
:class => ["align-bottom object-fit-none browse-icon", { "browse-icon-invertible" => selected_icon_data[:invert] }],
:title => title
end

Expand All @@ -27,7 +27,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 dc52cdc

Please sign in to comment.