From ae57e3d6df8447cab3cb465e7f4857c4b483fc5a Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sat, 28 Sep 2024 09:55:20 +0000 Subject: [PATCH] Moves stroke, stroke-width and fill attributes from icons to CSS (#23980). git-svn-id: https://svn.redmine.org/redmine/trunk@23087 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/assets/images/icons.svg | 174 ++++++++++++------------ app/assets/stylesheets/application.css | 26 ++-- app/helpers/icons_helper.rb | 2 +- test/helpers/application_helper_test.rb | 4 +- 4 files changed, 100 insertions(+), 106 deletions(-) diff --git a/app/assets/images/icons.svg b/app/assets/images/icons.svg index 2c991c3b6..6a2b46adc 100644 --- a/app/assets/images/icons.svg +++ b/app/assets/images/icons.svg @@ -1,25 +1,25 @@ - + - + - + - + - + - + @@ -29,13 +29,13 @@ - + - + @@ -43,143 +43,143 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -187,38 +187,38 @@ - + - + - + - + - + - + - + @@ -226,38 +226,38 @@ - + - + - + - + - + - + - + @@ -265,32 +265,32 @@ - + - + - + - + - + - + @@ -301,17 +301,17 @@ - + - + - + @@ -321,42 +321,42 @@ - + - + - + - + - + - + - + - + @@ -367,33 +367,33 @@ - + - + - + - + - + @@ -402,13 +402,13 @@ - + - + @@ -416,47 +416,47 @@ - + - + - + - + - + - + - + - + - + diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index d6708ad0e..22a3f9a8c 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1669,24 +1669,20 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { align-items: center; } -a.icon svg, a.icon-only svg { - fill: #169; -} - a.icon:hover svg, a.icon-only:hover svg { - fill: #c61a1a; + stroke: #c61a1a; } svg.icon-error { - fill: #f37c60; + stroke: #f37c60; } svg.icon-ok { - fill: #5db651; + stroke: #5db651; } .icon-warning svg { - fill: #e4bc4b; + stroke: #e4bc4b; } .icon-only span { @@ -1694,6 +1690,12 @@ svg.icon-ok { } svg { + &.icon-svg { + stroke: #169; + fill: none; + stroke-width: 2; + } + &.s20 { width: 1.25rem; height: 1.25rem; @@ -1719,14 +1721,6 @@ span.icon-label { margin-left: 4px; } -.icon-bookmarked-project svg { - fill: #169; -} - -.icon-user svg { - fill: #169; -} - /***** Legacy icons *****/ .icon:not(:has(svg)) { background-position: 0% 50%; diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index a29d42632..7ba87063b 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -61,7 +61,7 @@ module IconsHelper content_tag( :svg, content_tag(:use, '', { 'href' => "#{asset_path(sprite_path)}#icon--#{icon_name}" }), - class: "s#{size}", + class: "s#{size} icon-svg", aria: { hidden: true } diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index e5f97739b..eb3db11e0 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -1716,7 +1716,7 @@ class ApplicationHelperTest < Redmine::HelperTest Regexp.new( '
' \ '' \ - '' \ + '' \ 'Edit this section' \ '
' \ '' \ @@ -1731,7 +1731,7 @@ class ApplicationHelperTest < Redmine::HelperTest Regexp.new( '
' \ '' \ - '' \ + '' \ 'Edit this section' \ '
' \ '' \ -- 2.39.5