Skip to content

Commit

Permalink
Set sentence case tab names in Ruby instead of CSS
Browse files Browse the repository at this point in the history
I chose .capitalize instead of .humanize, because the latter has extra features which may not be desired.
  • Loading branch information
dacook committed Jun 8, 2023
1 parent fc428c3 commit 22a77cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion app/helpers/spree/admin/navigation_helper.rb
Expand Up @@ -26,7 +26,7 @@ def tab(*args)
destination_url = options[:url] || spree.public_send("#{options[:route]}_path")
titleized_label = Spree.t(options[:label],
default: options[:label],
scope: [:admin, :tab]).titleize
scope: [:admin, :tab]).capitalize

css_classes = []

Expand Down
8 changes: 0 additions & 8 deletions app/webpacker/css/admin_v3/components/navigation.scss
Expand Up @@ -77,10 +77,6 @@ nav.menu {
display: block;
padding: 25px 5px;
color: $color-9 !important;
text-transform: lowercase;
&::first-letter {
text-transform: uppercase;
}
position: relative;
text-align: center;
font-weight: 600;
Expand Down Expand Up @@ -136,10 +132,6 @@ nav.menu {
padding: 12px 20px;
color: $color-9;
text-align: center;
text-transform: lowercase;
&::first-letter {
text-transform: uppercase;
}
position: relative;
font-size: 14px;
}
Expand Down

0 comments on commit 22a77cf

Please sign in to comment.