Skip to content

Commit

Permalink
Let icons be 16px when unstyled
Browse files Browse the repository at this point in the history
This prevents them from being giant when shown in page captures made
by capybara.
  • Loading branch information
elia committed Oct 23, 2023
1 parent 382bdf2 commit 0871724
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions admin/app/components/solidus_admin/ui/icon/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def initialize(name:, **attrs)

# Hide the icon from screen readers by default.
@attrs['aria-hidden'] = true unless @attrs.key?('aria-hidden')

# Default icons without style to 16x16, mostly useful in test snapshots.
@attrs['width'] = '16'
@attrs['height'] = '16'
end

def call
Expand Down

0 comments on commit 0871724

Please sign in to comment.